* support table and column comment * create_table_from_entity support comment * fmt code * fmt code * add comment test * fix test
20 lines
554 B
Rust
20 lines
554 B
Rust
use sea_orm::entity::prelude::*;
|
|
|
|
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
|
|
#[sea_orm(table_name = "applog", comment = "app logs")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key, comment = "ID")]
|
|
pub id: i32,
|
|
#[sea_orm(comment = "action")]
|
|
pub action: String,
|
|
#[sea_orm(comment = "action data")]
|
|
pub json: Json,
|
|
#[sea_orm(comment = "create time")]
|
|
pub created_at: DateTimeWithTimeZone,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|