Implement ordering process

This commit is contained in:
2024-09-24 15:40:16 +02:00
parent 5b8f1fbead
commit 8329a6ae09
19 changed files with 274 additions and 160 deletions

View File

@@ -4,4 +4,9 @@ export class BasketItemModel {
id: number = -1
quantity: number = 1
product: ProductModel = new ProductModel()
constructor(quantity: number, product: ProductModel) {
this.quantity = quantity
this.product = product
}
}

View File

@@ -1,8 +1,8 @@
import { ProductModel } from "./productModel"
export class OrderedItemModel {
export class OrderItemModel {
orderId: number = -1
product: ProductModel
quantity: number = 1
totalPrice: number = 0
orderPrice: number = 0
product: ProductModel
}

View File

@@ -1,8 +1,9 @@
import { OrderedItemModel } from "./orderedItemModel"
import { OrderItemModel } from "./orderItemModel"
export class OrderModel {
id: number
accountId: number
shippingProgress: number
orderItems: Array<OrderedItemModel>
orderItems: Array<OrderItemModel>
orderedAt: string
}