1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "content_post")]
pub struct Model {
#[sea_orm(primary_key)]
pub post_id: i64,
#[sea_orm(column_type = "Text")]
pub title: String,
pub burrow_id: i64,
pub create_time: DateTimeWithTimeZone,
pub update_time: DateTimeWithTimeZone,
#[sea_orm(column_type = "Text")]
pub section: String,
#[sea_orm(column_type = "Text")]
pub tag: String,
pub post_len: i32,
pub post_type: i32,
pub post_state: i32,
pub like_num: i32,
pub collection_num: i32,
pub permission: i32,
}
#[derive(Copy, Clone, Debug, EnumIter)]
pub enum Relation {}
impl RelationTrait for Relation {
fn def(&self) -> RelationDef {
panic!("No RelationDef")
}
}
impl ActiveModelBehavior for ActiveModel {}