//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.14 use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "users")] pub struct Model { #[sea_orm(primary_key)] pub id: i64, #[sea_orm(unique)] pub username: String, pub password_hash: String, pub password_issue_date: DateTime, pub first_name: String, pub last_name: String, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm(has_many = "super::access_to_queue::Entity")] AccessToQueue, #[sea_orm(has_many = "super::queue_elements::Entity")] QueueElements, #[sea_orm(has_many = "super::queues::Entity")] Queues, } impl Related for Entity { fn to() -> RelationDef { Relation::AccessToQueue.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::QueueElements.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::Queues.def() } } impl ActiveModelBehavior for ActiveModel {}