very first commit
This commit is contained in:
6
src/app/models/category.model.ts
Normal file
6
src/app/models/category.model.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export interface Category {
|
||||
categoryID: number;
|
||||
name: string;
|
||||
parentID: number;
|
||||
icon?: string;
|
||||
}
|
||||
2
src/app/models/index.ts
Normal file
2
src/app/models/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './category.model';
|
||||
export * from './item.model';
|
||||
42
src/app/models/item.model.ts
Normal file
42
src/app/models/item.model.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
export interface Photo {
|
||||
photo?: string;
|
||||
video?: string;
|
||||
url: string;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
export interface Callback {
|
||||
rating?: number;
|
||||
content?: string;
|
||||
userID?: string;
|
||||
answer?: string;
|
||||
timestamp?: string;
|
||||
}
|
||||
|
||||
export interface Question {
|
||||
question: string;
|
||||
answer: string;
|
||||
upvotes: number;
|
||||
downvotes: number;
|
||||
}
|
||||
|
||||
export interface Item {
|
||||
categoryID: number;
|
||||
itemID: number;
|
||||
name: string;
|
||||
photos: Photo[] | null;
|
||||
description: string;
|
||||
currency: string;
|
||||
price: number;
|
||||
discount: number;
|
||||
remainings?: string;
|
||||
rating: number;
|
||||
callbacks: Callback[] | null;
|
||||
questions: Question[] | null;
|
||||
partnerID?: string;
|
||||
quantity?: number; // For cart items
|
||||
}
|
||||
|
||||
export interface CartItem extends Item {
|
||||
quantity: number;
|
||||
}
|
||||
Reference in New Issue
Block a user