//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.0

use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[sea_orm(table_name = "store_order")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i32,
    #[sea_orm(column_type = "Text")]
    pub order_sn: String,
    pub table_id: i32,
    pub pay_type: i32,
    pub amount: Option<Decimal>,
    pub pay_amount: Option<Decimal>,
    pub discount: Option<Decimal>,
    #[sea_orm(column_type = "Text", nullable)]
    pub param: Option<String>,
    pub service_fee: Option<Decimal>,
    #[sea_orm(column_type = "Text", nullable)]
    pub remark: Option<String>,
    #[sea_orm(column_type = "custom(\"DATETIME\")", nullable)]
    pub create_time: Option<String>,
    #[sea_orm(column_type = "custom(\"DATETIME\")", nullable)]
    pub update_time: Option<String>,
    #[sea_orm(column_type = "Text", nullable)]
    pub status: Option<String>,
    #[sea_orm(column_type = "custom(\"DATETIME\")", nullable)]
    pub pay_time: Option<String>,
    pub pay_status: Option<i32>,
    pub settle_status: Option<i32>,
    #[sea_orm(column_type = "Text", nullable)]
    pub goods: Option<String>,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}

impl ActiveModelBehavior for ActiveModel {}
