diff --git a/src/controllers/definitions/response/perfume.ts b/src/controllers/definitions/response/perfume.ts index 1765d91c..74fc9a8e 100644 --- a/src/controllers/definitions/response/perfume.ts +++ b/src/controllers/definitions/response/perfume.ts @@ -67,6 +67,9 @@ type NoteDict = { * type: array * items: * type: string + * priceComparisonUrl: + * type: string + * description: 가격 비교 url * score: * type: number * description: 점수 평균 값 @@ -169,6 +172,7 @@ class PerfumeDetailResponse { readonly noteType: number; readonly ingredients: NoteDict; readonly reviewIdx: number; + readonly priceComparisonUrl: string; constructor( perfumeIdx: number, name: string, @@ -186,7 +190,8 @@ class PerfumeDetailResponse { Keywords: string[], noteType: number, ingredients: NoteDict, - reviewIdx: number = NO_REVIEW + reviewIdx: number = NO_REVIEW, + priceComparisonUrl?: string ) { this.perfumeIdx = perfumeIdx; this.name = name; @@ -205,6 +210,7 @@ class PerfumeDetailResponse { this.noteType = noteType; this.ingredients = ingredients; this.reviewIdx = reviewIdx; + this.priceComparisonUrl = priceComparisonUrl ?? ''; } public toString(): string { @@ -242,7 +248,8 @@ class PerfumeDetailResponse { perfumeIntegralDTO.keywordList, perfumeIntegralDTO.noteType, perfumeIntegralDTO.noteDict, - perfumeIntegralDTO.reviewIdx + perfumeIntegralDTO.reviewIdx, + perfumeIntegralDTO.priceComparisonUrl ); } private static convertLongevity(longevity: any): Longevity { diff --git a/src/data/dto/PerfumeDTO.ts b/src/data/dto/PerfumeDTO.ts index 6316bde0..9ea0cc4f 100644 --- a/src/data/dto/PerfumeDTO.ts +++ b/src/data/dto/PerfumeDTO.ts @@ -8,6 +8,7 @@ class PerfumeDTO { readonly abundanceRate: number; readonly volumeAndPrice: { [key: string]: number }[]; readonly imageUrl: string; + readonly priceComparisonUrl: string; readonly Brand: BrandDTO; constructor( perfumeIdx: number, @@ -16,7 +17,8 @@ class PerfumeDTO { abundanceRate: number, volumeAndPrice: { [key: string]: number }[], imageUrl: string, - Brand: BrandDTO + Brand: BrandDTO, + priceComparisonUrl: string ) { this.perfumeIdx = perfumeIdx; this.name = name; @@ -26,6 +28,7 @@ class PerfumeDTO { this.volumeAndPrice = volumeAndPrice; this.imageUrl = imageUrl; this.Brand = Brand; + this.priceComparisonUrl = priceComparisonUrl; } public toString(): string { @@ -40,7 +43,8 @@ class PerfumeDTO { json.abundanceRate, json.volumeAndPrice, json.imageUrl, - BrandDTO.createByJson(json.Brand) + BrandDTO.createByJson(json.Brand), + json.priceComparisonUrl ); } } diff --git a/src/data/dto/PerfumeIntegralDTO.ts b/src/data/dto/PerfumeIntegralDTO.ts index e29f55b5..a53727ac 100644 --- a/src/data/dto/PerfumeIntegralDTO.ts +++ b/src/data/dto/PerfumeIntegralDTO.ts @@ -48,6 +48,7 @@ class PerfumeIntegralDTO { readonly noteType: number; readonly noteDict: NoteDict; readonly reviewIdx: number; + readonly priceComparisonUrl: string; constructor( perfumeIdx: number, name: string, @@ -65,7 +66,8 @@ class PerfumeIntegralDTO { keywordList: string[], noteType: number, noteDict: NoteDict, - reviewIdx: number + reviewIdx: number, + priceComparisonUrl: string ) { this.perfumeIdx = perfumeIdx; this.name = name; @@ -84,6 +86,7 @@ class PerfumeIntegralDTO { this.noteType = noteType; this.noteDict = noteDict; this.reviewIdx = reviewIdx; + this.priceComparisonUrl = priceComparisonUrl; } public toString(): string { @@ -142,7 +145,8 @@ class PerfumeIntegralDTO { json.keywordList, json.noteType, json.noteDict, - json.reviewIdx + json.reviewIdx, + json.priceComparisonUrl ); } }