changes
This commit is contained in:
@@ -11,12 +11,15 @@ export interface ItemTranslation {
|
||||
export interface ItemName {
|
||||
language: string;
|
||||
value: string;
|
||||
/** Backend typo — some responses use 'valuue' instead of 'value' */
|
||||
valuue?: string;
|
||||
}
|
||||
|
||||
/** Localized description entry */
|
||||
export interface ItemDescription {
|
||||
language: string;
|
||||
value: string;
|
||||
valuue?: string;
|
||||
}
|
||||
|
||||
/** Key-value attribute pair */
|
||||
@@ -25,6 +28,39 @@ export interface ItemAttribute {
|
||||
value: string;
|
||||
}
|
||||
|
||||
/** Item variant detail (price, size, colour per variant) */
|
||||
export interface ItemDetail {
|
||||
color?: string;
|
||||
colour?: string;
|
||||
size?: string;
|
||||
price: number;
|
||||
currency: string;
|
||||
remaining: number;
|
||||
}
|
||||
|
||||
/** Photo entry with type (photo or video) */
|
||||
export interface Photo {
|
||||
type?: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
/** Question on an item */
|
||||
export interface Question {
|
||||
question: string;
|
||||
answer: string;
|
||||
like?: number;
|
||||
dislike?: number;
|
||||
}
|
||||
|
||||
/** Review / callback on an item */
|
||||
export interface Review {
|
||||
rating?: number;
|
||||
content?: string;
|
||||
userID?: string;
|
||||
answer?: string;
|
||||
timestamp?: string;
|
||||
}
|
||||
|
||||
export interface Item {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -48,6 +84,18 @@ export interface Item {
|
||||
comments?: Comment[];
|
||||
/** Optional translations keyed by language code: { ru: { name: '...', simpleDescription: '...', description: [...] } } */
|
||||
translations?: { [lang: string]: ItemTranslation };
|
||||
|
||||
// Fields from Go backend struct
|
||||
itemID?: number;
|
||||
categoryID?: number;
|
||||
rating?: number;
|
||||
visits?: number;
|
||||
itemDetails?: ItemDetail[];
|
||||
photos?: Photo[];
|
||||
questions?: Question[];
|
||||
callbacks?: Review[];
|
||||
partnerID?: string;
|
||||
remaining?: number;
|
||||
}
|
||||
|
||||
export interface ItemDescriptionField {
|
||||
|
||||
Reference in New Issue
Block a user