Files
newfreeplanet_OLD/src/model/Products.ts

190 lines
3.3 KiB
TypeScript
Raw Normal View History

import { IUserFields } from './UserStore'
2021-08-31 18:09:59 +02:00
export interface IProduct {
_id?: any
active?: boolean
idProducer?: string,
idProvider?: string,
2021-08-31 18:09:59 +02:00
idStorehouses?: string[],
idScontisticas?: string[],
scontisticas: IScontistica[],
producer?: IProducer,
2021-09-02 03:22:13 +02:00
storehouses: IStorehouse[],
provider?: IProvider,
2021-08-31 18:09:59 +02:00
code?: string,
name?: string,
description?: string,
department?: string,
category?: string,
2023-12-18 08:02:35 +01:00
price: number,
2021-08-31 18:09:59 +02:00
after_price?: string,
color?: string,
size?: string,
quantityAvailable?: number,
QuantitaOrdinateInAttesa?: number,
stockQty?: number,
2021-08-31 18:09:59 +02:00
canBeShipped?: boolean,
canBeBuyOnline?: boolean,
weight?: number,
unit?: number,
2021-08-31 18:09:59 +02:00
stars?: number,
date?: Date,
icon?: string,
img?: string
}
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
idProducer?: string
idProvider?: string
2021-08-31 18:09:59 +02:00
idStorehouse?: string
idScontisticas?: string[]
2023-12-18 08:02:35 +01:00
price: number
TotalPriceProduct: number
2021-08-31 18:09:59 +02:00
after_price?: string
color?: string
size?: string
2023-11-30 15:43:32 +01:00
quantity: number
2021-08-31 18:09:59 +02:00
weight?: number
stars?: number
product?: IProduct
producer?: IProducer
storehouse?: IStorehouse
scontisticas?: IScontistica[]
provider?: IProvider
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[]
}
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,
}
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-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
}