use fieldx::fxstruct;
use sea_orm::prelude::Uuid;
use crate::test::simulation::types::OrderStatus;
#[fxstruct(no_new, builder, get(copy))]
#[derive(Clone, Debug)]
pub struct Order {
pub id: Uuid,
pub customer_id: i32,
pub product_id: i32,
pub quantity: i32,
pub status: OrderStatus,
}
impl From<Order> for crate::test::simulation::db::entity::Order {
fn from(order: Order) -> Self {
Self {
id: order.id,
customer_id: order.customer_id,
product_id: order.product_id,
quantity: order.quantity,
status: order.status,
purchased_on: 0, }
}
}