wb_cache/test/simulation/scriptwriter/entity/
order.rs1use fieldx::fxstruct;
2use sea_orm::prelude::Uuid;
3
4use crate::test::simulation::types::OrderStatus;
5
6#[fxstruct(no_new, builder, get(copy))]
7#[derive(Clone, Debug)]
8pub struct Order {
9 pub id: Uuid,
11 pub customer_id: i32,
13 pub product_id: i32,
15 pub quantity: i32,
17 pub status: OrderStatus,
19}
20
21impl From<Order> for crate::test::simulation::db::entity::Order {
22 fn from(order: Order) -> Self {
23 Self {
24 id: order.id,
25 customer_id: order.customer_id,
26 product_id: order.product_id,
27 quantity: order.quantity,
28 status: order.status,
29 purchased_on: 0, }
31 }
32}