use sea_orm::entity::prelude::*; use time::OffsetDateTime; use uuid::Uuid; #[sea_orm::model] #[derive(Clone, Debug, PartialEq, DeriveEntityModel)] #[sea_orm(table_name = "user_recovery_codes")] 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, #[sea_orm(unique)] pub code_hash: String, pub used_at: Option, pub expires_at: Option, pub created_at: OffsetDateTime, } impl ActiveModelBehavior for ActiveModel {}