-
Notifications
You must be signed in to change notification settings - Fork 36
/
types.ts
42 lines (41 loc) · 864 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
export interface IProduct {
id: number;
base_cost: number;
original_cost: number;
image: string;
name: string;
base_qty: string;
category_name?: string;
description: string;
}
export interface IProducutWithCategory {
category_id: number;
category_name: string;
product: IProduct;
}
export interface INotFound {
message: string;
}
export interface ProductResponse {
product: IProduct;
}
export interface INotFound {
message: string;
}
export type ICategory = ITopCategories;
export interface ITopCategories {
id: number;
name: string;
image: string;
product_count: number;
}
export interface ITopProducts {
category_id: number;
category_name: string;
product_count: number;
products: IProduct[];
}
export interface IAllProducts extends ITopProducts {}
export interface ICartProduct extends IProduct {
count: number;
}