//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.1 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: i64, #[sea_orm(column_type = "Text")] pub username: String, #[sea_orm(column_type = "Text")] pub email: String, #[sea_orm(column_type = "Text")] pub password_hash: String, pub bio: String, pub flags: i32, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm(has_many = "super::post::Entity")] Post, #[sea_orm(has_many = "super::session::Entity")] Session, } impl Related for Entity { fn to() -> RelationDef { Relation::Post.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::Session.def() } } impl ActiveModelBehavior for ActiveModel {}