//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.4 use sea_orm::entity::prelude::*; use serde::Deserialize; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Deserialize)] #[sea_orm(table_name = "users")] pub struct Model { pub created_at: DateTime, pub updated_at: DateTime, #[sea_orm(primary_key)] pub id: i32, #[sea_orm(unique)] pub pid: Uuid, #[sea_orm(unique)] pub email: String, pub password: String, pub name: String, pub reset_token: Option, pub reset_sent_at: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm(has_many = "super::notes::Entity")] Notes, } impl Related for Entity { fn to() -> RelationDef { Relation::Notes.def() } }