use sea_orm::entity::prelude::*; use time::OffsetDateTime; use uuid::Uuid; #[sea_orm::model] #[derive(Clone, Debug, PartialEq, DeriveEntityModel)] #[sea_orm(table_name = "user_email")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: Uuid, pub user_id: Uuid, #[sea_orm(belongs_to, from = "user_id", to = "uid")] pub user: BelongsTo, 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, pub deleted_at: Option, } impl ActiveModelBehavior for ActiveModel {}