Chris Tsang a6dfb417e2
Merge pull request #207 from SeaQL/naive-date
Support `chrono::NaiveDate` & `chrono::NaiveTime`
2021-09-30 22:52:31 +08:00

21 lines
525 B
Rust

use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "metadata")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub uuid: Uuid,
#[sea_orm(column_name = "type", enum_name = "Type")]
pub ty: String,
pub key: String,
pub value: String,
pub bytes: Vec<u8>,
pub date: Date,
pub time: Time,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}