~starkingdoms/starkingdoms

ref: 1b4d868e7ed43b913d8daee7f71ff0bc038bebf4 starkingdoms/api/starkingdoms_api_entities/src/entity/user.rs -rw-r--r-- 686 bytes
1b4d868e — core fix! change api and game urls (this should be the final in the flurry of commits i have pushed recently) 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 {}