-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduct.d.ts
45 lines (42 loc) · 868 Bytes
/
product.d.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
43
44
45
import {
CartItem,
Category,
Image,
Product,
ProductDetail,
Question,
Review,
Size,
Style,
SubCategory,
SubProduct,
} from "@prisma/client";
export interface CustomProduct extends Product {
category: Category;
subCategories: SubCategory[];
details: ProductDetail[];
questions: Question[];
reviews: Review[];
subProducts: (SubProduct & {
images: Image[];
description_images: Image[];
sizes: Size[];
color: Style;
})[];
}
export interface CustomSubProduct extends SubProduct {
product: {
category: Category;
details: ProductDetail[];
subCategories: SubCategory[] | null;
questions: Question[];
reviews: Review[];
} & Product;
color: Style;
sizes: Size[];
images: Image[];
description_images: Image[];
}
export interface ICartItem extends CartItem {
subProduct: CustomSubProduct;
}