b453d5d
use sea_orm::entity::prelude::*;
use time::OffsetDateTime;
use uuid::Uuid;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "user_email")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub user_id: i64,
#[sea_orm(belongs_to, from = "user_id", to = "uid")]
pub user: BelongsTo<super::user::Entity>,
pub email: String,
#[sea_orm(unique_key = "lower_email")]
pub lower_email: String,
pub is_activated: bool,
pub is_primary: bool,
pub created_at: OffsetDateTime,
pub updated_at: OffsetDateTime,
pub activated_at: Option<OffsetDateTime>,
pub deleted_at: Option<OffsetDateTime>,
}
impl ActiveModelBehavior for ActiveModel {}