Files
caszl-front-rs/src/entity/la_article_category.rs
quantulr e0fe8f6a09 cid
2023-11-14 11:15:49 +08:00

32 lines
768 B
Rust

//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "la_article_category")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: u32,
pub name: String,
pub sort: u16,
pub is_show: u8,
pub is_delete: u8,
pub create_time: Option<u32>,
pub update_time: Option<u32>,
pub delete_time: Option<u32>,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(has_many = "super::la_article::Entity")]
LaArticle
}
impl Related<super::la_article::Entity> for Entity {
fn to() -> RelationDef {
Relation::LaArticle.def()
}
}
impl ActiveModelBehavior for ActiveModel {}