Collection of user data
export interface UserData {
firstName: String,
lastName: String,
nickName: String,
email: String,
addresses: Address[],
roles: RoleEnum[],
cart: CartItem[],
defaultCurrency: String,
active: boolean,
banned: boolean,
}
export interface Address {
firstName: String,
lastName: String,
phone: String,
country: String,
postalCode: String,
city: String,
street: String,
streetNumber: String,
flatNumber?: String,
}
export interface CartItem {
dish: String,
quantity: number,
}
Collection of menu data
export interface DishData {
name: String,
category: String,
cuisine: String,
type: String,
ingredients: String[],
stock: number,
currency: String,
unitPrice: number,
ratingsAverage: number,
ratingsCount: number,
description: String[],
images: {
coverIdx: number,
gallery: ImageEntry[],
},
mainUnitPrice: number,
}
export interface ImageEntry {
breakpoints: number[],
paths: String[],
}
Collection of reviews and comments data
export interface ReviewData {
user: String,
dish: String,
order: String,
rating: number,
body: String[],
}
Collection of orders data
export interface OrderData {
user: String,
items: OrderItemsData[],
currency: String,
totalPrice: number,
}
export interface OrderItemsData{
dish: String,
quantity: number,
dishName: String,
unitPrice: number
}
Collection of global config
export interface ConfigData{
mainCurrency: String,
persistence: PersistanceEnum,
}
Collection of currencies data
export interface CurrencyData {
code: String,
symbol: String,
name: String,
}
Collection of exchange rates of currencies
export interface ExchangeRateData {
rate: number,
from: String,
to: String,
}