Files
marketplaces/src/app/models/item.model.ts

45 lines
788 B
TypeScript
Raw Normal View History

2026-01-18 18:57:06 +04:00
export interface Photo {
photo?: string;
video?: string;
url: string;
type?: string;
}
2026-02-26 21:54:21 +04:00
export interface Review {
2026-01-18 18:57:06 +04:00
rating?: number;
content?: string;
userID?: string;
answer?: string;
timestamp?: string;
}
2026-02-26 21:54:21 +04:00
/** @deprecated Use {@link Review} instead */
export type Callback = Review;
2026-01-18 18:57:06 +04:00
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;
2026-02-26 21:54:21 +04:00
callbacks: Review[] | null;
2026-01-18 18:57:06 +04:00
questions: Question[] | null;
partnerID?: string;
}
export interface CartItem extends Item {
quantity: number;
}