-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
55 lines (50 loc) · 952 Bytes
/
types.ts
File metadata and controls
55 lines (50 loc) · 952 Bytes
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
43
44
45
46
47
48
49
50
51
52
53
54
55
export interface Product {
id: string;
name: string;
category: string;
subCategory: string;
brand: string;
price: number;
originalPrice?: number;
rating: number;
reviewsCount: number;
image: string;
images: string[];
description: string;
isHot?: boolean;
isNew?: boolean;
variants: Variant[];
stock: number;
}
export interface Variant {
id: string;
name: string; // e.g., "Size", "Color"
options: {
value: string;
stock: number;
colorCode?: string;
}[];
}
export interface CartItem {
id: string;
productId: string;
name: string;
price: number;
quantity: number;
image: string;
selectedVariants: Record<string, string>;
}
export interface User {
id: string;
name: string;
email: string;
isPremium?: boolean;
avatar?: string;
}
export interface Order {
id: string;
date: string;
total: number;
status: 'Shipped' | 'Delivered' | 'Processing';
items: CartItem[];
}