Files
salvato.newfreeplanet/src/model/Products.ts
2023-12-28 00:50:42 +01:00

223 lines
4.0 KiB
TypeScript
Executable File

import { IUserFields } from './UserStore'
export interface IProductInfo {
_id?: any
code?: string,
name?: string,
description?: string,
department?: string,
idCatProds?: string[],
catprods?: ICatProd[],
color?: string,
size?: string,
weight?: number,
unit?: number,
stars?: number,
date?: Date,
icon?: string,
img?: string
}
export interface IProduct {
_id?: any
active?: boolean
idProductInfo?: string,
productInfo: IProductInfo,
idProducer?: string,
idProvider?: string,
idStorehouses?: string[],
idGasordines?: string[],
idScontisticas?: string[],
scontisticas: IScontistica[],
producer?: IProducer,
storehouses: IStorehouse[],
gasordines: IGasordine[],
provider?: IProvider,
price: number,
after_price?: string,
quantityAvailable?: number,
bookableAvailableQty?: number,
QuantitaOrdinateInAttesa?: number,
QuantitaPrenotateInAttesa?: number,
stockQty: number,
minBuyQty: number,
maxBookableQty: number,
bookableQty: number,
canBeShipped?: boolean,
canBeBuyOnline?: boolean,
}
export interface IBaseOrder {
order: IOrder
}
export interface IOrder {
_id?: any
idapp?: string
userId?: string
status?: number
idProduct?: string
idStorehouse?: string
idGasordine?: string
TotalPriceProduct: number
price: number
after_price?: string
quantity: number
quantitypreordered: number
product?: IProduct
storehouse?: IStorehouse
gasordine?: IGasordine
date_created?: Date
date_checkout?: Date
date_payment?: Date
date_shipping?: Date
date_delivered?: Date
notes?: string
}
export interface IProductsState {
products: IProduct[]
cart: ICart
orders: IOrderCart[]
catprods: ICatProd[]
productInfos: IProductInfo[]
}
export interface IProducer {
_id?: any
idapp?: string
name?: string,
description?: string,
referent?: string,
username?: string,
region?: string,
city?: string,
img?: string,
website?: string,
}
export interface IDepartment {
_id?: any
idapp?: string
name?: string,
username?: string,
}
export interface ICategory {
_id?: any
name: string,
img?: string,
}
export interface ICatProd {
_id?: any
name: string,
img?: string,
}
export interface IStorehouse {
_id?: any
idapp?: string
name?: string,
description?: string,
referent?: string,
address?: string,
city?: string,
region?: string,
img?: string,
website?: string,
email_html_header?: string,
email_html_footer?: string,
email_html_makeorder?: string,
email_html_order_confirmed?: string,
}
export interface IProvider {
_id?: any
idapp?: string
name?: string,
description?: string,
referent?: string,
address?: string,
city?: string,
region?: string,
img?: string,
website?: string,
}
export interface IGasordine {
_id?: any
idapp?: string
active: boolean
name?: string,
description?: string,
referent?: string,
city?: string,
img?: string,
dataora_chiusura_ordini?: Date,
dataora_ritiro?: Date,
}
export interface IScontistica {
_id?: any
idapp?: string
code?: string,
description?: string,
qta: number,
perc_sconto: number,
price: number,
comulativo: boolean,
}
export interface ICart {
_id?: any
idapp?: string
userId?: string
totalQty?: number
totalPrice?: number
department?: string
items?: IBaseOrder[]
note?: string
modify_at?: Date
}
export interface IOrderCart {
_id?: any
idapp?: string
numorder: number
numord_pers: number
userId: string
user: IUserFields,
totalQty: number
totalPrice: number
department?: string
items?: IBaseOrder[]
nameSurname?: string
status: number
modify_at?: Date
evaso: boolean
date_evaso?: Date
consegnato: boolean
date_consegnato?: Date
pagato: boolean
date_pagato?: Date
spedito: boolean
date_spedito?: Date
ricevuto: boolean
date_ricevuto?: Date
completato: boolean
date_completato?: Date
created_at: Date
note: string
}
export interface IShareWithUs {
_id?: any
idapp?: string
userId?: string
description: string
numshared?: number
rating?: number
}