Update types
This commit is contained in:
@ -16,9 +16,9 @@ type User = {
|
||||
|
||||
type Product = {
|
||||
id: string;
|
||||
productTitle: string;
|
||||
weight: number;
|
||||
img: string;
|
||||
title: string;
|
||||
weight?: number;
|
||||
picture: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
@ -32,9 +32,9 @@ type Maker = {
|
||||
id: string;
|
||||
name: string;
|
||||
email: string;
|
||||
phoneNumber: string;
|
||||
phoneNumber?: string;
|
||||
location: [number, number];
|
||||
products: Product[];
|
||||
stock: Product[];
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
@ -43,9 +43,9 @@ type Retailer = {
|
||||
id: string;
|
||||
name: string;
|
||||
email: string;
|
||||
phoneNumber: string;
|
||||
phoneNumber?: string;
|
||||
location: [number, number];
|
||||
products: Product[];
|
||||
stock: Product[];
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
@ -55,15 +55,15 @@ type DispatchStatus = typeof DISPATCH_STATUS[number];
|
||||
|
||||
type Dispatch = {
|
||||
id: string;
|
||||
dispatchesCode: string; //Human readable id
|
||||
dispatchesCode?: string; //Human readable id
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
|
||||
maker: Maker;
|
||||
retailer: Retailer;
|
||||
maker?: Maker;
|
||||
retailer?: Retailer;
|
||||
products: Product[];
|
||||
|
||||
courier: User;
|
||||
courier?: User;
|
||||
|
||||
timeSensitive: boolean;
|
||||
status: DispatchStatus[];
|
||||
|
@ -34,7 +34,7 @@ export interface Post {
|
||||
export interface User {
|
||||
id: string;
|
||||
name: string;
|
||||
phoneNumber: number;
|
||||
phoneNumber?: number;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
email: string;
|
||||
@ -65,19 +65,19 @@ export interface Courier {
|
||||
}
|
||||
export interface Dispatch {
|
||||
id: string;
|
||||
dispatchesCode: string;
|
||||
products?: string[] | Product[];
|
||||
products: string[] | Product[];
|
||||
courier?: string | Courier;
|
||||
maker?: string | Maker;
|
||||
retailer?: string | Retailer;
|
||||
status?: ('requested' | 'accepted' | 'archived')[];
|
||||
status: ('requested' | 'accepted' | 'archived')[];
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
export interface Product {
|
||||
id: string;
|
||||
productTitle: string;
|
||||
picture?: string | Media;
|
||||
title: string;
|
||||
picture: string | Media;
|
||||
weight?: number;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
@ -88,8 +88,8 @@ export interface Maker {
|
||||
* @minItems 2
|
||||
* @maxItems 2
|
||||
*/
|
||||
location?: [number, number];
|
||||
products?: string[] | Product[];
|
||||
location: [number, number];
|
||||
stock?: string[] | Product[];
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
@ -100,8 +100,8 @@ export interface Retailer {
|
||||
* @minItems 2
|
||||
* @maxItems 2
|
||||
*/
|
||||
location?: [number, number];
|
||||
requestedProducts?: string[] | Product[];
|
||||
location: [number, number];
|
||||
stock?: string[] | Product[];
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
Reference in New Issue
Block a user