@yolo-croket-dev/entity-v2 0.2.97-hj-1 → 0.2.97-sj1

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,35 @@
1
+ import { Types } from 'mongoose';
2
+ import { CommissionPolicyTypeEnum } from '../store';
3
+ /** @description 수수료 결정 추적 로그 */
4
+ export default class CommissionAuditLogEntity {
5
+ _id: Types.ObjectId | string;
6
+ /** @description payTryLog 아이디 */
7
+ payTryLogId: Types.ObjectId | string;
8
+ /** @description 스토어 아이디 */
9
+ storeId: Types.ObjectId | string;
10
+ /** @description 셀러 아이디 */
11
+ sellerId: Types.ObjectId | string;
12
+ /** @description 적용 수수료 비율 */
13
+ appliedRate: number;
14
+ /** @description 적용 수수료 정책 유형 */
15
+ appliedPolicyType: CommissionPolicyTypeEnum;
16
+ /** @description 기준 금액 */
17
+ baseAmount: number;
18
+ /** @description 계산된 수수료 */
19
+ calculatedFee: number;
20
+ /** @description 계산된 부가세 */
21
+ calculatedVAT: number;
22
+ /** @description 예상 수고비 */
23
+ expectedProceeds: number;
24
+ /** @description 당시 스토어 수수료 비율 */
25
+ pastStoreCommissionRate: number;
26
+ /** @description 당시 스토어 수수료 정책 유형 */
27
+ pastStorePolicyType: CommissionPolicyTypeEnum;
28
+ /** @description 결정 이유 */
29
+ decisionReason: string;
30
+ /** @description 수고비 버전 */
31
+ proceedsVersion: number;
32
+ /** @description 등록 일자 */
33
+ regDate: Date;
34
+ }
35
+ export { CommissionAuditLogEntity };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CommissionAuditLogEntity = void 0;
4
+ /** @description 수수료 결정 추적 로그 */
5
+ class CommissionAuditLogEntity {
6
+ }
7
+ exports.default = CommissionAuditLogEntity;
8
+ exports.CommissionAuditLogEntity = CommissionAuditLogEntity;
@@ -0,0 +1 @@
1
+ export * from './commission-audit-log.entity';
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./attrobution-touch.entity"), exports);
17
+ __exportStar(require("./commission-audit-log.entity"), exports);
package/index.d.ts CHANGED
@@ -51,5 +51,4 @@ export * from './brand.modules/brand-bookmark';
51
51
  export * from './brand.modules/brand-log';
52
52
  export * from './daily-random-coupon-noti-user';
53
53
  export * from './store-item.modules';
54
- export * from './attribution-touch';
55
- export * from './attribution-history';
54
+ export * from './commission-audit-log';
package/index.js CHANGED
@@ -67,5 +67,4 @@ __exportStar(require("./brand.modules/brand-bookmark"), exports);
67
67
  __exportStar(require("./brand.modules/brand-log"), exports);
68
68
  __exportStar(require("./daily-random-coupon-noti-user"), exports);
69
69
  __exportStar(require("./store-item.modules"), exports);
70
- __exportStar(require("./attribution-touch"), exports);
71
- __exportStar(require("./attribution-history"), exports);
70
+ __exportStar(require("./commission-audit-log"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/entity-v2",
3
- "version": "0.2.97-hj-1",
3
+ "version": "0.2.97-sj1",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 nest 용 entity-v3",
@@ -23,4 +23,4 @@
23
23
  },
24
24
  "license": "UNLICENSED",
25
25
  "dependencies": {}
26
- }
26
+ }
package/store/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export * from './store-by-seller-id.entity';
3
3
  export * from './abroad-account.entity';
4
4
  export * from './store-for-toss-payment.entity';
5
5
  export * from './domestic-account-store.entity';
6
+ export * from './store-commission-history.entity';
package/store/index.js CHANGED
@@ -19,3 +19,4 @@ __exportStar(require("./store-by-seller-id.entity"), exports);
19
19
  __exportStar(require("./abroad-account.entity"), exports);
20
20
  __exportStar(require("./store-for-toss-payment.entity"), exports);
21
21
  __exportStar(require("./domestic-account-store.entity"), exports);
22
+ __exportStar(require("./store-commission-history.entity"), exports);
@@ -0,0 +1,31 @@
1
+ import { Types } from 'mongoose';
2
+ import { CommissionPolicyTypeEnum, CommissionRatePeriodInfo } from './store.entity';
3
+ /** @description 셀러 수수료 정보 변경 이력 */
4
+ export default class StoreCommissionHistoryEntity {
5
+ _id: Types.ObjectId | string;
6
+ /** @description 스토어 아이디 */
7
+ storeId: Types.ObjectId | string;
8
+ /** @description 셀러 아이디 */
9
+ sellerId: Types.ObjectId | string;
10
+ /** @description 이전 수수료 비율 */
11
+ previousRate?: number;
12
+ /** @description 새 수수료 비율 */
13
+ newRate?: number;
14
+ /** @description 이전 수수료 정책 유형 */
15
+ previousPolicyType?: CommissionPolicyTypeEnum;
16
+ /** @description 새 수수료 정책 유형 */
17
+ newPolicyType?: CommissionPolicyTypeEnum;
18
+ /** @description 이유 코드 */
19
+ reasonCode?: string;
20
+ /** @description 이유 상세 */
21
+ reasonDetail?: string;
22
+ /** @description 관리자 아이디 */
23
+ managerId?: Types.ObjectId | string;
24
+ /** @description 이전 수수료 비율 기간 */
25
+ previousCommissionRatePeriodInfos?: CommissionRatePeriodInfo[];
26
+ /** @description 새 수수료 비율 기간 */
27
+ newCommissionRatePeriodInfos?: CommissionRatePeriodInfo[];
28
+ /** @description 등록 일자 */
29
+ regDate: Date;
30
+ }
31
+ export { StoreCommissionHistoryEntity };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StoreCommissionHistoryEntity = void 0;
4
+ /** @description 셀러 수수료 정보 변경 이력 */
5
+ class StoreCommissionHistoryEntity {
6
+ }
7
+ exports.default = StoreCommissionHistoryEntity;
8
+ exports.StoreCommissionHistoryEntity = StoreCommissionHistoryEntity;
@@ -204,6 +204,41 @@ export interface StorePenaltyPledge {
204
204
  /** @description 패널티 등록 시간 */
205
205
  regDate: Date;
206
206
  }
207
+ export declare enum CommissionPolicyTypeEnum {
208
+ /** @description 기본 수수료 비율 */
209
+ DEFAULT = "DEFAULT",
210
+ /** @description 커스텀 수수료 비율 */
211
+ CUSTOM = "CUSTOM"
212
+ }
213
+ export interface CommissionRatePeriodInfo {
214
+ /** @description 수수료 비율 */
215
+ commissionRate: number;
216
+ /** @description 수수료 비율 적용 시작 일자 */
217
+ startDate: Date;
218
+ /** @description 수수료 비율 적용 종료 일자 */
219
+ endDate: Date;
220
+ }
221
+ /** @description 셀러 수수료 정보 */
222
+ export interface StoreCommissionInfo {
223
+ /** @description 셀러 수수료 비율 */
224
+ commissionRate: number;
225
+ /** @description 이전 수수료 비율 */
226
+ previousRate?: number;
227
+ /** @description 적용 일자 */
228
+ effectiveDate?: Date;
229
+ /** @description 수수료 비율 기간 */
230
+ commissionRatePeriodInfos?: CommissionRatePeriodInfo[];
231
+ /** @description 수수료 정책 유형 */
232
+ commissionPolicyType: CommissionPolicyTypeEnum;
233
+ /** @description 마지막 수정 일자 */
234
+ lastModifiedDate?: Date;
235
+ /** @description 마지막 수정 관리자 아이디 */
236
+ lastModifiedManagerId?: Types.ObjectId | string;
237
+ /** @description 수정 이유 */
238
+ modifyReason?: string;
239
+ /** @description 등록 일자 */
240
+ regDate: Date;
241
+ }
207
242
  /** store schema inteface (아직 선언하다 말았음) */
208
243
  export default class StoreEntity {
209
244
  _id: Types.ObjectId | string;
@@ -235,5 +270,7 @@ export default class StoreEntity {
235
270
  lastProceedsGoalSettleDate?: Date;
236
271
  /** @description 셀러 패널티 서약 */
237
272
  penaltyPledge?: StorePenaltyPledge;
273
+ /** @description 셀러 수수료 정보 */
274
+ commissionInfo: StoreCommissionInfo;
238
275
  }
239
276
  export { StoreEntity };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StoreEntity = exports.SupermarketInfo = exports.LastBeforeAccountInfo = exports.ProceedsMethodInfo = exports.BusinessInfo = exports.ZeroRateVatInfo = exports.ForeignBusinessInfo = exports.PrivateSellerInfo = exports.DomesticBusinessInfo = exports.ZeroRateVatProcessEnum = exports.IndividualTaxationTypeEnum = exports.StoreAccount = exports.BUSINESS_INFO_NOT_MATCH_REASONS = exports.BusinessInfoVerifiProcessEnum = exports.BusinessInfoSellerTypeEnum = exports.ProceedsMethodTypeEnum = exports.StoreLastActivityTypeEnum = void 0;
3
+ exports.StoreEntity = exports.CommissionPolicyTypeEnum = exports.SupermarketInfo = exports.LastBeforeAccountInfo = exports.ProceedsMethodInfo = exports.BusinessInfo = exports.ZeroRateVatInfo = exports.ForeignBusinessInfo = exports.PrivateSellerInfo = exports.DomesticBusinessInfo = exports.ZeroRateVatProcessEnum = exports.IndividualTaxationTypeEnum = exports.StoreAccount = exports.BUSINESS_INFO_NOT_MATCH_REASONS = exports.BusinessInfoVerifiProcessEnum = exports.BusinessInfoSellerTypeEnum = exports.ProceedsMethodTypeEnum = exports.StoreLastActivityTypeEnum = void 0;
4
4
  var StoreLastActivityTypeEnum;
5
5
  (function (StoreLastActivityTypeEnum) {
6
6
  // 상품 등록
@@ -93,6 +93,13 @@ exports.LastBeforeAccountInfo = LastBeforeAccountInfo;
93
93
  class SupermarketInfo {
94
94
  }
95
95
  exports.SupermarketInfo = SupermarketInfo;
96
+ var CommissionPolicyTypeEnum;
97
+ (function (CommissionPolicyTypeEnum) {
98
+ /** @description 기본 수수료 비율 */
99
+ CommissionPolicyTypeEnum["DEFAULT"] = "DEFAULT";
100
+ /** @description 커스텀 수수료 비율 */
101
+ CommissionPolicyTypeEnum["CUSTOM"] = "CUSTOM";
102
+ })(CommissionPolicyTypeEnum || (exports.CommissionPolicyTypeEnum = CommissionPolicyTypeEnum = {}));
96
103
  /** store schema inteface (아직 선언하다 말았음) */
97
104
  class StoreEntity {
98
105
  }
@@ -1,9 +0,0 @@
1
- import { Types } from 'mongoose';
2
- import { AttributionTouchEntity } from '../attribution-touch';
3
- export interface AttributionHistoryEntity {
4
- _id: Types.ObjectId | string;
5
- userId: Types.ObjectId | string;
6
- pInfoIds: Types.ObjectId[] | string[];
7
- regDate: Date;
8
- histories: AttributionTouchEntity[];
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export * from './attribution-history.entity';
@@ -1,17 +0,0 @@
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("./attribution-history.entity"), exports);
@@ -1,105 +0,0 @@
1
- import { Types } from 'mongoose';
2
- export declare enum AttributionPlatformEnum {
3
- ANDROID = "android",
4
- IOS = "iOS",
5
- DESKTOP = "desktop"
6
- }
7
- export declare enum AttributionChannelEnum {
8
- NAVER = "naver",
9
- KAKAO = "kakao",
10
- META = "meta",
11
- GOOGLE = "google"
12
- }
13
- /**
14
- * @description
15
- * yg 정보
16
- * 존재 이유: 기존 앱 버전은 utm 데이터를 상품 상세 페이지 에서만 읽기 때문에 외부용 utm 정보들을 수집 불가
17
- * -> yg정보는 앱에서 언제든 추적 하기 때문에 외부에 yg 정보를 심어 마케팅 팀에서 사용하였음 (yg정보가 심어진 외부 광고가 많음)
18
- * */
19
- export interface AttributionYgGroup {
20
- yg_type?: string;
21
- yg_method?: string;
22
- }
23
- export interface AttributionUtmGroup {
24
- utm_source?: string;
25
- utm_medium?: string;
26
- utm_campaign?: string;
27
- utm_content?: string;
28
- utm_term?: string;
29
- }
30
- export interface AttributionNaver {
31
- ad_type?: string;
32
- n_media?: string;
33
- n_query?: string;
34
- n_rank?: number;
35
- n_ad_group?: string;
36
- n_ad?: string;
37
- n_keyword_id?: string;
38
- n_keyword?: string;
39
- n_match?: number;
40
- n_campaign_type?: number;
41
- n_mail_pid?: string;
42
- n_mail_id?: string;
43
- }
44
- export interface AttributionKakao {
45
- kclid?: string;
46
- }
47
- export interface AttributionMeta {
48
- fbclid?: string;
49
- ad_id?: string;
50
- adset_id?: string;
51
- campaign_id?: string;
52
- placement?: string;
53
- platform?: string;
54
- }
55
- export interface AttributionGoogle {
56
- gclid?: string;
57
- keyword?: string;
58
- matchtype?: string;
59
- campaign_id?: string;
60
- network?: string;
61
- adposition?: string;
62
- }
63
- export declare enum AttributionTouchTypeEnum {
64
- /** 내부 */
65
- INTERNAL = "internal",
66
- /** 외부 */
67
- EXTERNAL = "external"
68
- }
69
- export interface AttributionTouchEntity {
70
- _id: Types.ObjectId | string;
71
- /** 아이피 */
72
- ip: string;
73
- /** 운영체제 */
74
- platform: AttributionPlatformEnum;
75
- /** 어트리 뷰션 아이디 */
76
- attributionId?: string;
77
- /** 만료 날짜 ttl 처리 */
78
- expired_ttl?: Date;
79
- /** 터치 시간 - 생성일 */
80
- touchTime: Date;
81
- /** ygGroup */
82
- ygGroup?: AttributionYgGroup;
83
- /** 채널 */
84
- channel?: AttributionChannelEnum;
85
- /** utm 그룹 */
86
- utmGroup?: AttributionUtmGroup;
87
- /** 네이버 */
88
- naver?: AttributionNaver;
89
- /** 카카오 */
90
- kakao?: AttributionKakao;
91
- /** 메타 */
92
- meta?: AttributionMeta;
93
- /** 구글 */
94
- google?: AttributionGoogle;
95
- referrer?: string;
96
- /** 랜딩 url (해당 url의 프로퍼티에서 필요한 값들을 추출) */
97
- landingUrl?: string;
98
- /** 터치 타입 (내부, 외부) */
99
- type: AttributionTouchTypeEnum;
100
- userId?: Types.ObjectId | string;
101
- /** 내부용 이벤트 */
102
- event?: string;
103
- /** 내부용 파라미터 */
104
- params?: string;
105
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AttributionTouchTypeEnum = exports.AttributionChannelEnum = exports.AttributionPlatformEnum = void 0;
4
- var AttributionPlatformEnum;
5
- (function (AttributionPlatformEnum) {
6
- AttributionPlatformEnum["ANDROID"] = "android";
7
- AttributionPlatformEnum["IOS"] = "iOS";
8
- AttributionPlatformEnum["DESKTOP"] = "desktop";
9
- })(AttributionPlatformEnum || (exports.AttributionPlatformEnum = AttributionPlatformEnum = {}));
10
- var AttributionChannelEnum;
11
- (function (AttributionChannelEnum) {
12
- AttributionChannelEnum["NAVER"] = "naver";
13
- AttributionChannelEnum["KAKAO"] = "kakao";
14
- AttributionChannelEnum["META"] = "meta";
15
- AttributionChannelEnum["GOOGLE"] = "google";
16
- })(AttributionChannelEnum || (exports.AttributionChannelEnum = AttributionChannelEnum = {}));
17
- var AttributionTouchTypeEnum;
18
- (function (AttributionTouchTypeEnum) {
19
- /** 내부 */
20
- AttributionTouchTypeEnum["INTERNAL"] = "internal";
21
- /** 외부 */
22
- AttributionTouchTypeEnum["EXTERNAL"] = "external";
23
- })(AttributionTouchTypeEnum || (exports.AttributionTouchTypeEnum = AttributionTouchTypeEnum = {}));
@@ -1 +0,0 @@
1
- export * from './attrobution-touch.entity';