bazzar/crates/model/src/v4/tax_providers.rs

27 lines
1.4 KiB
Rust
Raw Normal View History

2023-06-03 13:31:57 +02:00
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
use sea_orm :: entity :: prelude :: * ; use serde :: { Deserialize , Serialize } ;
# [derive (Copy , Clone , Default , Debug , DeriveEntity)] pub struct Entity ;
impl EntityName for Entity { fn table_name (& self) -> & str { "tax_providers" } }
# [derive (Clone , Debug , PartialEq , DeriveModel , DeriveActiveModel , Eq , Serialize , Deserialize)] pub struct Model { pub id : String , pub is_installed : bool , }
# [derive (Copy , Clone , Debug , EnumIter , DeriveColumn)] pub enum Column { Id , IsInstalled , }
# [derive (Copy , Clone , Debug , EnumIter , DerivePrimaryKey)] pub enum PrimaryKey { Id , }
impl PrimaryKeyTrait for PrimaryKey { type ValueType = String ; fn auto_increment () -> bool { false } }
# [derive (Copy , Clone , Debug , EnumIter)] pub enum Relation { Regions , }
impl ColumnTrait for Column { type EntityName = Entity ; fn def (& self) -> ColumnDef { match self { Self :: Id => ColumnType :: String (None) . def () , Self :: IsInstalled => ColumnType :: Boolean . def () , } } }
impl RelationTrait for Relation { fn def (& self) -> RelationDef { match self { Self :: Regions => Entity :: has_many (super :: regions :: Entity) . into () , } } }
impl Related < super :: regions :: Entity > for Entity { fn to () -> RelationDef { Relation :: Regions . def () } }
impl ActiveModelBehavior for ActiveModel { }