Files
caszl-front-rs/src/entity/la_article_category.rs

32 lines
768 B
Rust
Raw Normal View History

2023-11-12 22:30:58 +08:00
//! `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)]
2023-11-14 11:15:49 +08:00
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()
}
}
2023-11-12 22:30:58 +08:00
impl ActiveModelBehavior for ActiveModel {}