@yolo-croket-dev/entity-v2 0.2.114-hj-1 → 0.2.114

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.
@@ -2,17 +2,13 @@ import { Types } from 'mongoose';
2
2
  export declare enum AppBulkPushLogTypeEnum {
3
3
  검색쿼리 = "searchQuery",
4
4
  엑셀 = "excel",
5
- 엑셀_예약 = "excel_reservation",
6
- 타임딜 = "timeDeal"
5
+ 엑셀_예약 = "excel_reservation"
7
6
  }
8
7
  export declare enum AppBulkPushLogProcessEnum {
9
8
  대기 = "ready",
10
9
  진행중 = "ing",
11
10
  완료 = "done"
12
11
  }
13
- export interface TimeDealInfo {
14
- timeDealId: Types.ObjectId;
15
- }
16
12
  export interface AppPushInfo {
17
13
  title: string;
18
14
  content: string;
@@ -89,7 +85,5 @@ export default interface AppBulkPushLogEntity {
89
85
  lastSendDate?: Date;
90
86
  /** 발송 오류 이유 */
91
87
  errorReason?: string;
92
- /** 타임딜 */
93
- timeDealInfo?: TimeDealInfo;
94
88
  }
95
89
  export { AppBulkPushLogEntity };
@@ -6,7 +6,6 @@ var AppBulkPushLogTypeEnum;
6
6
  AppBulkPushLogTypeEnum["\uAC80\uC0C9\uCFFC\uB9AC"] = "searchQuery";
7
7
  AppBulkPushLogTypeEnum["\uC5D1\uC140"] = "excel";
8
8
  AppBulkPushLogTypeEnum["\uC5D1\uC140_\uC608\uC57D"] = "excel_reservation";
9
- AppBulkPushLogTypeEnum["\uD0C0\uC784\uB51C"] = "timeDeal";
10
9
  })(AppBulkPushLogTypeEnum || (exports.AppBulkPushLogTypeEnum = AppBulkPushLogTypeEnum = {}));
11
10
  var AppBulkPushLogProcessEnum;
12
11
  (function (AppBulkPushLogProcessEnum) {
@@ -0,0 +1,42 @@
1
+ import { Types } from 'mongoose';
2
+ export declare enum CartPushLogStatusEnum {
3
+ /** 야간 대기 - 발송 전 큐에 쌓인 상태 */
4
+ pending = "pending",
5
+ /** 발송 완료 */
6
+ sent = "sent",
7
+ /** 발송 제외 */
8
+ skipped = "skipped"
9
+ }
10
+ export declare enum CartPushLogSkipReasonEnum {
11
+ /** 당일 해당 구매자에게 이미 발송 완료 */
12
+ alreadySentToday = "alreadySentToday",
13
+ /** 발송 시점에 장바구니가 만료/삭제됨 */
14
+ cartNotFound = "cartNotFound"
15
+ }
16
+ /**
17
+ * @author jun
18
+ * @description 장바구니 푸시 알림 발송 로그 엔티티
19
+ * @process
20
+ * - 야간(21:00~09:59): status=pending으로 저장, 10:00 이후 일괄 발송
21
+ * - 주간(10:00~20:58): status=pending으로 저장 후 즉시 발송 처리
22
+ * - 발송 시점에 장바구니가 사라진 경우: status=skipped로 업데이트
23
+ */
24
+ export interface CartPushLogEntity {
25
+ _id: Types.ObjectId;
26
+ /** 구매자 아이디 */
27
+ buyerId: Types.ObjectId;
28
+ /** 대상 장바구니 아이디 */
29
+ cartId: Types.ObjectId;
30
+ /** 발송 상태 */
31
+ status: CartPushLogStatusEnum;
32
+ /** 등록일 (당일 기준 중복 체크용) */
33
+ regDate: Date;
34
+ /** 발송 완료 시각 */
35
+ sentDate?: Date;
36
+ /** 스킵 처리 시각 (status=skipped 일 때 설정) */
37
+ skippedDate?: Date;
38
+ /** 스킵 사유 (status=skipped 일 때 설정) */
39
+ skipReason?: CartPushLogSkipReasonEnum;
40
+ /** TTL 자동 삭제 기준일 (regDate + 2개월, 장바구니 만료 기간과 동일) */
41
+ expiredAt_ttl?: Date;
42
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CartPushLogSkipReasonEnum = exports.CartPushLogStatusEnum = void 0;
4
+ var CartPushLogStatusEnum;
5
+ (function (CartPushLogStatusEnum) {
6
+ /** 야간 대기 - 발송 전 큐에 쌓인 상태 */
7
+ CartPushLogStatusEnum["pending"] = "pending";
8
+ /** 발송 완료 */
9
+ CartPushLogStatusEnum["sent"] = "sent";
10
+ /** 발송 제외 */
11
+ CartPushLogStatusEnum["skipped"] = "skipped";
12
+ })(CartPushLogStatusEnum || (exports.CartPushLogStatusEnum = CartPushLogStatusEnum = {}));
13
+ var CartPushLogSkipReasonEnum;
14
+ (function (CartPushLogSkipReasonEnum) {
15
+ /** 당일 해당 구매자에게 이미 발송 완료 */
16
+ CartPushLogSkipReasonEnum["alreadySentToday"] = "alreadySentToday";
17
+ /** 발송 시점에 장바구니가 만료/삭제됨 */
18
+ CartPushLogSkipReasonEnum["cartNotFound"] = "cartNotFound";
19
+ })(CartPushLogSkipReasonEnum || (exports.CartPushLogSkipReasonEnum = CartPushLogSkipReasonEnum = {}));
@@ -0,0 +1 @@
1
+ export * from './cart-push-log.entity';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./cart-push-log.entity"), exports);
package/index.d.ts CHANGED
@@ -53,3 +53,4 @@ export * from './daily-random-coupon-noti-user';
53
53
  export * from './store-item.modules';
54
54
  export * from './attribution-touch';
55
55
  export * from './attribution-history';
56
+ export * from './cart-push-log';
package/index.js CHANGED
@@ -69,3 +69,4 @@ __exportStar(require("./daily-random-coupon-noti-user"), exports);
69
69
  __exportStar(require("./store-item.modules"), exports);
70
70
  __exportStar(require("./attribution-touch"), exports);
71
71
  __exportStar(require("./attribution-history"), exports);
72
+ __exportStar(require("./cart-push-log"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/entity-v2",
3
- "version": "0.2.114-hj-1",
3
+ "version": "0.2.114",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 nest 용 entity-v3",
@@ -23,7 +23,5 @@ export default interface TimeDealEntityForAdmin {
23
23
  storeItemLastDeadLine: Date;
24
24
  /** @description 타임딜 관련 상품 리스트 */
25
25
  storeItems: TimeDealStoreItemInfo[];
26
- /** @description 타임딜 앱 푸시 이미지 - 푸시알림 발송 시 사용되는 이미지 */
27
- appPushImageUrl?: string;
28
26
  }
29
27
  export { TimeDealEntityForAdmin };
@@ -65,18 +65,6 @@ export interface UserReceive {
65
65
  brandNewsAppPush?: boolean;
66
66
  /** @description 브랜드 소식 앱 푸시 변경 시간 */
67
67
  lastModifyDate_brandNewsAppPush?: Date;
68
- /** @description 앱 시스템 알림 동의 여부 */
69
- systemAppPush?: boolean;
70
- /** @description 앱 시스템 알림 동의 마지막 수정일 - systemAppPush 값이 변경 된 날짜 / 동일한 값으로 수정 요청 시 변경 X */
71
- lastModifyDate_systemAppPush?: Date;
72
- /** @description 타임딜 앱 푸시 동의 여부 */
73
- timeDealAppPush?: boolean;
74
- /** @description 타임딜 앱 푸시 변경 시간 */
75
- lastModifyDate_timeDealAppPush?: Date;
76
- /** @description 야간 앱 푸시 동의 여부 */
77
- nightAppPush?: boolean;
78
- /** @description 야간 앱 푸시 변경 시간 */
79
- lastModifyDate_nightAppPush?: Date;
80
68
  }
81
69
  export interface UserPromotionCode {
82
70
  /** @description 나의 코드 */