//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] #[sea_orm(table_name = "orders")] pub struct Model { pub created_at: DateTimeWithTimeZone, pub updated_at: DateTimeWithTimeZone, #[sea_orm(primary_key)] pub id: i32, #[sea_orm(unique)] pub order_number: String, pub email: String, pub customer_name: Option, pub status: String, pub total_cents: i64, pub currency: String, pub address: Option, pub city: Option, pub zip: Option, pub country: Option, #[sea_orm(column_type = "Text", nullable)] pub note: Option, pub payment_method: Option, pub carrier_code: Option, pub carrier_name: Option, pub shipping_cents: i64, pub pickup_point_id: Option, pub pickup_point_name: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm(has_many = "super::order_items::Entity")] OrderItems, } impl Related for Entity { fn to() -> RelationDef { Relation::OrderItems.def() } }