Skip to content

Latest commit

 

History

History

diagram

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Description

User

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,
}
Example

UserExample

Dishes

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[],
}
Example

DishesExample

Reviews

Collection of reviews and comments data

export interface ReviewData {
  user: String,
  dish: String,
  order: String,
  rating: number,
  body: String[],
}
Example

ReviewsExample

Orders

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
}
Example

OrdersExample

Config

Collection of global config

export interface ConfigData{
  mainCurrency: String,
  persistence: PersistanceEnum,
}
Example

ConfigExample

Currencies

Collection of currencies data

export interface CurrencyData {
  code: String,
  symbol: String,
  name: String,
}
Example

CurrenciesExample

ExchangeRates

Collection of exchange rates of currencies

export interface ExchangeRateData {
  rate: number,
  from: String,
  to: String,
}
Example

ExchangeRateExample