@yolo-croket-dev/entity-v2 0.2.113 → 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.
@@ -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.113",
3
+ "version": "0.2.114",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 nest 용 entity-v3",