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
28
29
30
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "user")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub uid: i64,
#[sea_orm(column_type = "Text")]
pub username: String,
#[sea_orm(column_type = "Text")]
pub password: String,
#[sea_orm(column_type = "Text")]
pub email: String,
pub create_time: DateTimeWithTimeZone,
#[sea_orm(column_type = "Text")]
pub salt: String,
}
#[derive(Copy, Clone, Debug, EnumIter)]
pub enum Relation {}
impl RelationTrait for Relation {
fn def(&self) -> RelationDef {
panic!("No RelationDef")
}
}
impl ActiveModelBehavior for ActiveModel {}