~starkingdoms/starkingdoms

ref: f8a7045d08bbed2a8f0b0d3c5e9291db0c09c355 starkingdoms/api/starkingdoms_api_entities/src/entity/user.rs -rw-r--r-- 686 bytes
f8a7045d — ghostlyzsh merged auth and entities, some planet stuff may be slightly broken 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2

use sea_orm::entity::prelude::*;

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user")]
pub struct Model {
    #[sea_orm(primary_key, auto_increment = false)]
    pub id: String,
    #[sea_orm(unique)]
    pub username: String,
    pub created_on: i64,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
    #[sea_orm(has_many = "super::user_auth_realm::Entity")]
    UserAuthRealm,
}

impl Related<super::user_auth_realm::Entity> for Entity {
    fn to() -> RelationDef {
        Relation::UserAuthRealm.def()
    }
}

impl ActiveModelBehavior for ActiveModel {}