//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.19 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] #[sea_orm(table_name = "users")] pub struct Model { pub created_at: DateTimeWithTimeZone, pub updated_at: DateTimeWithTimeZone, #[sea_orm(primary_key)] pub id: i32, pub pid: Uuid, #[sea_orm(unique)] pub email: String, pub password: String, #[sea_orm(unique)] pub api_key: String, pub name: String, pub reset_token: Option, pub reset_sent_at: Option, pub email_verification_token: Option, pub email_verification_sent_at: Option, pub email_verified_at: Option, pub magic_link_token: Option, pub magic_link_expiration: Option, pub theme: String, pub account_type: String, #[sea_orm(column_type = "Text", nullable)] pub totp_secret: Option, pub totp_enabled_at: Option, #[sea_orm(column_type = "Text", nullable)] pub totp_backup_codes: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm(has_many = "super::account_discount_profiles::Entity")] AccountDiscountProfiles, #[sea_orm(has_many = "super::account_product_prices::Entity")] AccountProductPrices, #[sea_orm(has_many = "super::account_product_resolutions::Entity")] AccountProductResolutions, #[sea_orm(has_many = "super::audit_logs::Entity")] AuditLogs, #[sea_orm(has_one = "super::customer_profiles::Entity")] CustomerProfiles, #[sea_orm(has_many = "super::o_auth2_sessions::Entity")] OAuth2Sessions, } impl Related for Entity { fn to() -> RelationDef { Relation::AccountDiscountProfiles.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::AccountProductPrices.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::AccountProductResolutions.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::AuditLogs.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::CustomerProfiles.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::OAuth2Sessions.def() } }