@yolo-croket-dev/entity-v2 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/entity-v2",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 nest 용 entity-v3",
@@ -1 +1,2 @@
1
1
  export * from './store-item-price-fluctuation-log.entity';
2
+ export * from './store-item-price-fluctuation-notification-trigger.entity';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./store-item-price-fluctuation-log.entity"), exports);
18
+ __exportStar(require("./store-item-price-fluctuation-notification-trigger.entity"), exports);
@@ -0,0 +1,29 @@
1
+ import { Types } from 'mongoose';
2
+ export type STORE_ITEM_PRICE_FLUCTUATION_TRIGGER_TYPE = 'MINUS' | 'PLUS';
3
+ export interface StoreItemPriceFluctuationNotificationTrigger {
4
+ _id: Types.ObjectId | string;
5
+ /** 상품 아이디 */
6
+ storeItemId: Types.ObjectId | string;
7
+ /** 상품 최대할인 쿠폰가 */
8
+ calulatedItemPrice?: number;
9
+ /** 상품 가격 */
10
+ itemPriceForBuyer: number;
11
+ /** 생성시간 */
12
+ createdAt: Date;
13
+ /** 기준 가격 (쿠폰가가 있다면 쿠폰가, 없다면 상품가격) */
14
+ basePrice: number;
15
+ /** 기준 가격 변동폭 */
16
+ basePriceFluctuation: number;
17
+ /** 트리거 완료 여부 (기본값 false), 완료처리 이후 true */
18
+ isTriggerCompleted: boolean;
19
+ /** 트리거 처리 완료된 시간 */
20
+ triggerCompletedAt?: Date;
21
+ /** 해당하는 트리거로 영향받은 유저 수 (로그 및 데이터 확인용) */
22
+ triggerUsersCount?: number;
23
+ /** 트리거 타입 */
24
+ triggerType: STORE_ITEM_PRICE_FLUCTUATION_TRIGGER_TYPE | string;
25
+ /** 트리거 조건 만족 여부 (가격이 발송시와 동일한 상태에 있는지에 대한 여부) */
26
+ isTriggerConditionMatch?: boolean;
27
+ /** 상품아이디와 실행일과의 unique key 설정 (중복 방지) */
28
+ uniqueTriggerId: string;
29
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });