11//! `SeaORM` Entity, @generated by sea-orm-codegen 1.0.0-rc.5
22
33use sea_orm:: entity:: prelude:: * ;
4- use serde:: { Deserialize , Serialize } ;
4+ use serde:: Serialize ;
55
6- #[ derive( Clone , Debug , PartialEq , DeriveEntityModel , Eq , Serialize , Deserialize ) ]
6+ #[ derive( Clone , Debug , PartialEq , DeriveEntityModel , Eq , Serialize ) ]
77#[ sea_orm( table_name = "users" ) ]
88pub struct Model {
99 #[ sea_orm( primary_key) ]
1010 pub id : i32 ,
1111 #[ sea_orm( unique) ]
12- pub user_name : String ,
13- pub first_name : Option < String > ,
14- pub last_name : Option < String > ,
12+ pub username : String ,
13+ pub first_name : String ,
14+ pub last_name : String ,
15+ pub age : i32 ,
1516 #[ sea_orm( unique) ]
1617 pub email : String ,
1718 pub password : String ,
18- pub age : i32 ,
1919 pub gender : String ,
20- pub location : Option < String > ,
21- pub openness : Option < String > ,
22- pub interests : Option < String > ,
23- pub exp_qual : Option < String > ,
24- pub relation_type : Option < String > ,
25- pub social_habits : Option < String > ,
26- pub past_relations : Option < String > ,
27- pub values : Option < String > ,
28- pub style : Option < String > ,
29- pub traits : Option < String > ,
30- pub commitment : Option < String > ,
31- pub resolution : Option < String > ,
32- pub image_url : String ,
33- pub score : i32 ,
34- #[ sea_orm( unique) ]
35- pub uuid : Uuid ,
3620 pub created_at : DateTime ,
3721}
3822
3923#[ derive( Copy , Clone , Debug , EnumIter , DeriveRelation ) ]
4024pub enum Relation {
4125 #[ sea_orm( has_many = "super::avatar::Entity" ) ]
4226 Avatar ,
27+ #[ sea_orm( has_many = "super::pass_reset::Entity" ) ]
28+ PassReset ,
29+ #[ sea_orm( has_many = "super::user_details::Entity" ) ]
30+ UserDetails ,
4331}
4432
4533impl Related < super :: avatar:: Entity > for Entity {
@@ -48,4 +36,16 @@ impl Related<super::avatar::Entity> for Entity {
4836 }
4937}
5038
39+ impl Related < super :: pass_reset:: Entity > for Entity {
40+ fn to ( ) -> RelationDef {
41+ Relation :: PassReset . def ( )
42+ }
43+ }
44+
45+ impl Related < super :: user_details:: Entity > for Entity {
46+ fn to ( ) -> RelationDef {
47+ Relation :: UserDetails . def ( )
48+ }
49+ }
50+
5151impl ActiveModelBehavior for ActiveModel { }
0 commit comments