* Upgrade to SeaQuery 0.28.0 * Remove unnecessary heap allocation * Upgrade sea-query-binder * Upgrade sea-schema * Fix * Upgrade sea-schema * refactoring Co-authored-by: Ivan Krivosheev <py.krivosheev@gmail.com>
21 lines
593 B
Rust
21 lines
593 B
Rust
use sea_orm::entity::prelude::*;
|
|
use serde::{Serialize, Deserialize};
|
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
|
|
#[sea_orm(table_name = "materials")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub id: i32,
|
|
pub created_at: DateTimeWithTimeZone,
|
|
pub updated_at: DateTimeWithTimeZone,
|
|
pub name: String,
|
|
#[sea_orm(column_type = "Text", nullable)]
|
|
pub description: Option<String> ,
|
|
pub tag_ids: Vec<u8> ,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|