Matching UI with improved API

This commit is contained in:
2024-09-24 13:12:44 +02:00
parent bc62174566
commit abe1b496a2
34 changed files with 194 additions and 545 deletions

View File

@@ -1,15 +1,14 @@
import { AccountRole } from "./accountRole"
import { AddressModel } from "./addressModel"
import { PaymentModel } from "./paymentModel"
export class AccountModel {
id: number
username: string = ""
password: string = ""
street: string = ""
houseNumber: number = 0
postalCode: number = 0
city: string = ""
firstName: string = ""
lastName: string = ""
createdAt: string = ""
updatedAt: string = ""
bankName: string = ""
iban: string = ""
addresses: Array<AddressModel> = [ new AddressModel() ]
payments: Array<PaymentModel> = [ new PaymentModel() ]
accountRole: AccountRole = new AccountRole()
}

View File

@@ -0,0 +1,5 @@
export class AccountRole {
name: string = ""
privilegeBuy: boolean = false
privilegeAdminPanel: boolean = false
}

View File

@@ -0,0 +1,6 @@
export class AddressModel {
street: string = ""
houseNumber: number = 0
postalCode: number = 0
city: string = ""
}

View File

@@ -1,10 +1,7 @@
import { ProductModel } from "./productModel"
export class BasketItemModel {
id: number = -1
brand: string = ""
name: string = ""
categoryName: string = ""
categoryIcon: string = ""
price: number = 0
discount: number = 0
quantity: number = 1
product: ProductModel = new ProductModel()
}

View File

@@ -0,0 +1,4 @@
export class BrandModel {
id: number = 0
name: string = ""
}

View File

@@ -2,6 +2,4 @@ export class CategoryModel {
id: number = -1
name: string
icon: string
createdAt: string = ""
updatedAt: string = ""
}

View File

@@ -2,8 +2,7 @@ import { OrderedItemModel } from "./orderedItemModel"
export class OrderModel {
accountId: number
totalPrice: number
shippingProgress: number
orderItem: Array<OrderedItemModel>
createdAt: string
orderItems: Array<OrderedItemModel>
orderedAt: string
}

View File

@@ -0,0 +1,4 @@
export class PaymentModel {
bankName: string = ""
iban: string = ""
}

View File

@@ -1,13 +1,16 @@
import { BrandModel } from "./brandModel"
import { CategoryModel } from "./categoryModel"
export class ProductModel {
id: number = -1
brand: string
name: string
id: number = 0
category: CategoryModel = new CategoryModel()
brand: BrandModel = new BrandModel()
name: string = ""
description: string = ""
specs: Array<string> = []
categoryId: number
price: number = 0
discount: number = 0
rating: number = 1
inStock: number
specs: Array<string> = []
images: Array<string> = [""]
storedItems: number
}

View File

@@ -1,15 +0,0 @@
import { CategoryModel } from "./categoryModel"
export class ProductWithCategoryModel {
id: number = -1
brand: string
name: string
description: string = ""
specs: Array<string> = []
category: CategoryModel = new CategoryModel()
price: number = 0
discount: number = 0
rating: number = 1
images: Array<string> = [""]
storedItems: number
}