25 lines
737 B
Rust
25 lines
737 B
Rust
//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0.0-rc.18
|
|
|
|
use sea_orm::entity::prelude::*;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[sea_orm::model]
|
|
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)]
|
|
#[sea_orm(table_name = "user")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key, auto_increment = false)]
|
|
pub id: Uuid,
|
|
#[sea_orm(unique)]
|
|
pub name: String,
|
|
pub is_admin: bool,
|
|
pub is_active: bool,
|
|
pub created_at: DateTimeUtc,
|
|
pub updated_at: DateTimeUtc,
|
|
pub last_login_at: Option<DateTimeUtc>,
|
|
pub deleted_at: Option<DateTimeUtc>,
|
|
#[sea_orm(has_many)]
|
|
pub user_identities: HasMany<super::user_identity::Entity>,
|
|
}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|