Files
myprojplanet_vite/src/model/Products.ts

218 lines
3.9 KiB
TypeScript
Raw Normal View History

import { IUserFields } 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[],
catprods?: ICatProd[],
color?: string,
size?: string,
weight?: number,
unit?: number,
stars?: number,
date?: Date,
icon?: string,
img?: string
}
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[],
idGasordines?: string[],
idScontisticas?: string[],
scontisticas: IScontistica[],
producer?: IProducer,
2021-09-02 03:22:13 +02:00
storehouses: IStorehouse[],
gasordines: IGasordine[],
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,
stockQty: number,
minBuyQty: number,
2023-12-27 02:58:23 +01:00
maxBookableQty: number,
2023-12-20 21:56:30 +01:00
bookableQty: number,
2021-08-31 18:09:59 +02:00
canBeShipped?: boolean,
canBeBuyOnline?: boolean,
}
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
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
}
export interface IProductsState {
products: IProduct[]
cart: ICart
orders: IOrderCart[]
2023-12-27 02:58:23 +01:00
catprods: ICatProd[]
productInfos: IProductInfo[]
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,
}
2021-08-31 18:09:59 +02:00
export interface IStorehouse {
_id?: any
idapp?: string
name?: string,
description?: string,
referent?: string,
address?: string,
city?: string,
region?: string,
img?: string,
website?: 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,
dataora_chiusura_ordini?: 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
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
user: IUserFields,
2023-12-13 19:18:00 +01:00
totalQty: number
totalPrice: 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
2023-12-13 19:18:00 +01:00
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
2023-12-14 15:20:27 +01:00
completato: boolean
date_completato?: Date
created_at: Date
note: 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
}