增加一些字段

This commit is contained in:
2025-09-18 14:35:31 +08:00
parent 3f538cdc0b
commit d0dda6d23c
8 changed files with 50 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize};
#[derive(DeriveEntityModel, Clone, Debug, PartialEq, Serialize, Deserialize)]
#[sea_orm(table_name = "id_card")]
pub struct Model {
#[sea_orm(primary_key)]
#[sea_orm(primary_key, unique)]
pub id: String,
pub name: String,
pub gender: Gender,
@@ -13,6 +13,7 @@ pub struct Model {
pub address: Option<String>,
pub nation: String,
pub create_at: DateTime,
pub update_at: DateTime,
}
pub type IDCardModel = Model;