Files
myprojplanet_vite/src/model/Products.ts

286 lines
5.4 KiB
TypeScript
Raw Normal View History

import { IUserFields, IUserShort } from './UserStore'
2023-12-27 02:58:23 +01:00
export interface IProductInfo {
_id?: any
code?: string,
name?: string,
description?: string,
department?: string,
idCatProds?: string[],
2024-01-12 13:03:07 +01:00
idSubCatProds?: string[],
2023-12-27 02:58:23 +01:00
catprods?: ICatProd[],
2024-01-12 13:03:07 +01:00
subcatprods?: ISubCatProd[],
2023-12-27 02:58:23 +01:00
color?: string,
size?: string,
weight?: number,
2024-02-06 20:13:06 +01:00
weight_lordo?: number,
unit: number,
2024-02-06 20:13:06 +01:00
unit_lordo?: number,
sfuso?: boolean,
2023-12-27 02:58:23 +01:00
stars?: number,
date?: Date,
icon?: string,
img?: string
2024-01-02 15:24:57 +01:00
ingredienti?: string,
2024-02-06 20:13:06 +01:00
link_scheda?: string,
2024-01-02 15:24:57 +01:00
valori_nutrizionali?: string,
2023-12-27 02:58:23 +01:00
}
2021-08-31 18:09:59 +02:00
export interface IProduct {
_id?: any
active?: boolean
2023-12-27 02:58:23 +01:00
idProductInfo?: string,
productInfo: IProductInfo,
2021-08-31 18:09:59 +02:00
idProducer?: string,
idProvider?: string,
2021-08-31 18:09:59 +02:00
idStorehouses?: string[],
2024-01-16 16:56:57 +01:00
idGasordine?: string,
idScontisticas?: string[],
scontisticas: IScontistica[],
producer?: IProducer,
2021-09-02 03:22:13 +02:00
storehouses: IStorehouse[],
2024-01-16 16:56:57 +01:00
gasordine: IGasordine | null,
provider?: IProvider,
2023-12-18 08:02:35 +01:00
price: number,
2021-08-31 18:09:59 +02:00
after_price?: string,
quantityAvailable?: number,
2023-12-20 21:56:30 +01:00
bookableAvailableQty?: number,
QuantitaOrdinateInAttesa?: number,
2023-12-20 21:56:30 +01:00
QuantitaPrenotateInAttesa?: number,
note?: string
stockQty: number, // UPDATING
stockBloccatiQty: number, // UPDATING
2024-01-03 15:46:48 +01:00
bookedQtyOrdered: number // UPDATING
bookedQtyConfirmed: number // UPDATING
qtyToReachForGas: number
maxbookableGASQty: number
bookedGASQtyOrdered: number // UPDATING
2024-01-03 15:46:48 +01:00
bookedGASQtyConfirmed: number // UPDATING
bookableGASBloccatiQty: number // UPDATING
minBuyQty: number
minStepQty: number
maxBookableSinglePersQty: number
canBeShipped?: boolean
canBeBuyOnline?: boolean
2021-08-31 18:09:59 +02:00
}
export interface IBaseOrder {
2021-09-02 03:22:13 +02:00
order: IOrder
2021-08-31 18:09:59 +02:00
}
export interface IOrder {
_id?: any
idapp?: string
userId?: string
status?: number
idProduct?: string
idStorehouse?: string
2023-12-27 02:58:23 +01:00
idGasordine?: string
2023-12-18 08:02:35 +01:00
TotalPriceProduct: number
TotalPriceProductCalc: number
2023-12-27 02:58:23 +01:00
price: number
2021-08-31 18:09:59 +02:00
after_price?: string
2023-11-30 15:43:32 +01:00
quantity: number
2023-12-20 21:56:30 +01:00
quantitypreordered: number
2021-08-31 18:09:59 +02:00
product?: IProduct
storehouse?: IStorehouse
2023-12-21 02:23:58 +01:00
gasordine?: IGasordine
2021-08-31 18:09:59 +02:00
date_created?: Date
date_checkout?: Date
date_payment?: Date
date_shipping?: Date
date_delivered?: Date
notes?: string
2023-12-28 21:00:10 +01:00
modify_at?: Date
2021-08-31 18:09:59 +02:00
}
export interface IProductsState {
products: IProduct[]
cart: ICart
orders: IOrderCart[]
2023-12-27 02:58:23 +01:00
catprods: ICatProd[]
2024-01-23 00:10:52 +01:00
catprods_gas: ICatProd[]
2024-01-12 13:03:07 +01:00
subcatprods: ISubCatProd[]
2023-12-27 02:58:23 +01:00
productInfos: IProductInfo[]
userActive: IUserShort
2021-08-31 18:09:59 +02:00
}
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,
}
2023-11-28 14:12:45 +01:00
export interface ICategory {
_id?: any
name: string,
img?: string,
}
2023-12-27 02:58:23 +01:00
export interface ICatProd {
_id?: any
name: string,
img?: string,
2023-12-29 15:19:21 +01:00
icon?: string,
color?: string,
2023-12-27 02:58:23 +01:00
}
2024-01-30 14:00:48 +01:00
export interface ICatAI {
_id?: any
name: string,
img?: string,
icon?: string,
color?: string,
}
export interface IQueryAI {
_id?: any
name: string,
img?: string,
icon?: string,
color?: string,
}
2024-01-12 13:03:07 +01:00
export interface ISubCatProd {
_id?: any
idCatProd: string
name: string
img?: string
icon?: string
color?: string
}
2021-08-31 18:09:59 +02:00
export interface IStorehouse {
_id?: any
idapp?: string
name?: string,
2024-01-02 15:24:57 +01:00
username?: string,
2024-01-03 23:46:36 +01:00
groupname?: 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_GAS_makeorder?: string,
email_html_order_confirmed?: string,
email_html_GAS_order_confirmed?: string,
2023-12-29 21:17:25 +01:00
email_html_order_consegnato?: string,
email_html_GAS_order_consegnato?: string,
}
export interface IProvider {
_id?: any
idapp?: string
2021-08-31 18:09:59 +02:00
name?: string,
description?: string,
referent?: string,
address?: string,
city?: string,
region?: string,
img?: string,
website?: string,
}
2023-12-21 02:23:58 +01:00
export interface IGasordine {
_id?: any
idapp?: string
active: boolean
name?: string,
description?: string,
referent?: string,
city?: string,
img?: string,
note_ordine_gas?: string
dataora_chiusura_ordini?: Date,
2023-12-28 23:48:09 +01:00
data_arrivo_merce?: Date,
2023-12-21 02:23:58 +01:00
dataora_ritiro?: Date,
}
2023-12-16 00:51:10 +01:00
export interface IScontistica {
_id?: any
idapp?: string
code?: string,
description?: string,
qta: number,
perc_sconto: number,
price: number,
comulativo: boolean,
}
2021-08-31 18:09:59 +02:00
export interface ICart {
_id?: any
idapp?: string
userId?: string
totalQty?: number
totalPrice?: number
totalPriceCalc?: number
2021-08-31 18:09:59 +02:00
department?: string
items?: IBaseOrder[]
note?: string
modify_at?: Date
}
export interface IOrderCart {
_id?: any
idapp?: string
2023-12-13 19:18:00 +01:00
numorder: number
2023-12-15 23:36:48 +01:00
numord_pers: number
2023-12-13 19:18:00 +01:00
userId: string
2024-01-09 15:32:21 +01:00
user: IUserFields | null,
2023-12-13 19:18:00 +01:00
totalQty: number
totalPrice: number
totalPriceCalc: number
2021-08-31 18:09:59 +02:00
department?: string
items?: IBaseOrder[]
nameSurname?: string
2023-12-13 19:18:00 +01:00
status: number
2021-08-31 18:09:59 +02:00
modify_at?: Date
confermato: boolean
date_confermato?: Date
2023-12-13 19:18:00 +01:00
consegnato: boolean
date_consegnato?: Date
pagato: boolean
date_pagato?: Date
spedito: boolean
date_spedito?: Date
ricevuto: boolean
date_ricevuto?: Date
2024-01-09 15:32:21 +01:00
created_at?: Date
note: string
2024-01-13 16:21:19 +01:00
note_per_gestore: string
note_per_admin: string
note_ordine_gas: string
2021-08-31 18:09:59 +02:00
}
export interface IShareWithUs {
_id?: any
idapp?: string
userId?: string
2021-09-16 21:08:02 +02:00
description: string
2021-08-31 18:09:59 +02:00
numshared?: number
rating?: number
}