@yolo-croket-dev/entity-v2 0.2.124-jun.0 → 0.2.124-jun.10
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/data-payment-method/data-payment-method.entity.d.ts +2 -1
- package/data-payment-method/data-payment-method.entity.js +1 -0
- package/package.json +1 -1
- package/purchased-info/purchased-info.entity.d.ts +70 -0
- package/purchased-info/purchased-info.entity.js +39 -1
- package/user/index.d.ts +1 -0
- package/user/index.js +1 -0
- package/user/user-card-billing.entity.d.ts +58 -0
- package/user/user-card-billing.entity.js +9 -0
|
@@ -4,7 +4,8 @@ export { PayTryLogPayMethodTypeEnum };
|
|
|
4
4
|
export declare enum DataPaymentMethodPayTypeEnum {
|
|
5
5
|
'ask' = "ask",
|
|
6
6
|
'store' = "store",
|
|
7
|
-
'store-cart' = "store-cart"
|
|
7
|
+
'store-cart' = "store-cart",
|
|
8
|
+
'store-reservation' = "store-reservation"
|
|
8
9
|
}
|
|
9
10
|
export interface DataPaymentMethodEntity {
|
|
10
11
|
_id: Types.ObjectId;
|
|
@@ -8,4 +8,5 @@ var DataPaymentMethodPayTypeEnum;
|
|
|
8
8
|
DataPaymentMethodPayTypeEnum["ask"] = "ask";
|
|
9
9
|
DataPaymentMethodPayTypeEnum["store"] = "store";
|
|
10
10
|
DataPaymentMethodPayTypeEnum["store-cart"] = "store-cart";
|
|
11
|
+
DataPaymentMethodPayTypeEnum["store-reservation"] = "store-reservation";
|
|
11
12
|
})(DataPaymentMethodPayTypeEnum || (exports.DataPaymentMethodPayTypeEnum = DataPaymentMethodPayTypeEnum = {}));
|
package/package.json
CHANGED
|
@@ -1,8 +1,43 @@
|
|
|
1
1
|
import { Types } from 'mongoose';
|
|
2
2
|
import { SelectionFrameDataTypeEnum } from '@yolo-croket-dev/entity/src/selection-frame-data';
|
|
3
3
|
import { SettleVersionEnum } from '@yolo-croket-dev/entity/src/settle';
|
|
4
|
+
import { PayTryLogPastReservationInfo } from '@yolo-croket-dev/entity/src/pay-try-log/pay-try-log.entity';
|
|
4
5
|
import { PartialRefundProcessEnum } from '../partial-refund';
|
|
5
6
|
import { PurchasedInfoTosspaymentsRefund } from './purchased-info.entity/p-info-tosspayments-refund.vo';
|
|
7
|
+
export declare enum CardQuotaEnum {
|
|
8
|
+
일시불 = "00",
|
|
9
|
+
'1개월' = "01",
|
|
10
|
+
'2개월' = "02",
|
|
11
|
+
'3개월' = "03",
|
|
12
|
+
'4개월' = "04",
|
|
13
|
+
'5개월' = "05",
|
|
14
|
+
'6개월' = "06",
|
|
15
|
+
'7개월' = "07",
|
|
16
|
+
'8개월' = "08",
|
|
17
|
+
'9개월' = "09",
|
|
18
|
+
'10개월' = "10",
|
|
19
|
+
'11개월' = "11",
|
|
20
|
+
'12개월' = "12"
|
|
21
|
+
}
|
|
22
|
+
export declare enum ReservationCancelTypeEnum {
|
|
23
|
+
/** 예약 매칭 실패로 취소됨 */
|
|
24
|
+
reserveMatchFailed = "reserveMatchFailed",
|
|
25
|
+
/** 예약 취소 요청으로 취소됨*/
|
|
26
|
+
reserveCancelAsk = "reserveCancelAsk"
|
|
27
|
+
}
|
|
28
|
+
export declare enum ReservationCancelReasonEnum {
|
|
29
|
+
/** 유저 직접 취소 */
|
|
30
|
+
userCancel = "userCancel",
|
|
31
|
+
/** 재고 부족으로 매칭 실패 */
|
|
32
|
+
matchingFailedStock = "matchingFailedStock",
|
|
33
|
+
/** 결제 실패로 매칭 실패 */
|
|
34
|
+
matchingFailedPayment = "matchingFailedPayment"
|
|
35
|
+
}
|
|
36
|
+
export declare enum PInfoTypeEnum {
|
|
37
|
+
normal = "normal",
|
|
38
|
+
card = "card",
|
|
39
|
+
reservation = "reservation"
|
|
40
|
+
}
|
|
6
41
|
export declare enum POptionTypeEnum {
|
|
7
42
|
single = "single",
|
|
8
43
|
group = "group"
|
|
@@ -857,6 +892,41 @@ export default interface PurchasedInfoEntity {
|
|
|
857
892
|
};
|
|
858
893
|
/** @description 어트리뷰션 히스토리 아이디 */
|
|
859
894
|
attributionHistoryId?: Types.ObjectId | string;
|
|
895
|
+
pInfoType?: PInfoTypeEnum;
|
|
896
|
+
reservationInfo?: PurchasedReservationInfo;
|
|
897
|
+
}
|
|
898
|
+
export interface PurchasedReservationInfo {
|
|
899
|
+
/** 결제 여부 */
|
|
900
|
+
isPaid: boolean;
|
|
901
|
+
/** 예약 순서 */
|
|
902
|
+
reservationOrder: number;
|
|
903
|
+
/** 당시 상품 정보의 예약 정보 */
|
|
904
|
+
pastReservationInfo: PayTryLogPastReservationInfo;
|
|
905
|
+
/** 예약 일시 */
|
|
906
|
+
reservedDate: Date;
|
|
907
|
+
/** 결제 확정 일시 (빌링키 결제 성공 시점) */
|
|
908
|
+
paymentConfirmedDate?: Date;
|
|
909
|
+
/** 예약 취소일시 */
|
|
910
|
+
cancelledDate?: Date;
|
|
911
|
+
/** 예약 취소 타입 */
|
|
912
|
+
cancelType?: ReservationCancelTypeEnum;
|
|
913
|
+
/** 예약 취소 사유 (cancelled 상태일 때 상세 구분용) */
|
|
914
|
+
cancelReason?: ReservationCancelReasonEnum;
|
|
915
|
+
/** 결제에 사용된 빌링 데이터 ID */
|
|
916
|
+
userCardBillingId: Types.ObjectId;
|
|
917
|
+
/** 1차 결제 실패 일시 (재시도 기한 계산 기준) */
|
|
918
|
+
firstPaymentFailedDate?: Date;
|
|
919
|
+
/** 재시도 기한 만료일 (firstPaymentFailedDate + 24h) */
|
|
920
|
+
retryDeadline?: Date;
|
|
921
|
+
/** 결제 실패 이력 */
|
|
922
|
+
paymentFailureLogs?: ReservationPaymentFailureLog[];
|
|
923
|
+
/** 카드 할부 개월 수 */
|
|
924
|
+
cardQuota: CardQuotaEnum;
|
|
925
|
+
}
|
|
926
|
+
export interface ReservationPaymentFailureLog {
|
|
927
|
+
reason: string;
|
|
928
|
+
failedDate: Date;
|
|
929
|
+
userCardBillingId: Types.ObjectId;
|
|
860
930
|
}
|
|
861
931
|
export interface PurchasedInfoPastStoreInfo {
|
|
862
932
|
storeTitle: string;
|
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InsuranceProcessTypeEnum = exports.PastSelectionFrameDataInfo = exports.PurchasedProcessV2Enum = exports.PurchasedProcessEnum = exports.UserTypeEnum = exports.TaxInvoiceIssueProcessEnum = exports.POptionTypeEnum = void 0;
|
|
3
|
+
exports.InsuranceProcessTypeEnum = exports.PastSelectionFrameDataInfo = exports.PurchasedProcessV2Enum = exports.PurchasedProcessEnum = exports.UserTypeEnum = exports.TaxInvoiceIssueProcessEnum = exports.POptionTypeEnum = exports.PInfoTypeEnum = exports.ReservationCancelReasonEnum = exports.ReservationCancelTypeEnum = exports.CardQuotaEnum = void 0;
|
|
4
|
+
var CardQuotaEnum;
|
|
5
|
+
(function (CardQuotaEnum) {
|
|
6
|
+
CardQuotaEnum["\uC77C\uC2DC\uBD88"] = "00";
|
|
7
|
+
CardQuotaEnum["1\uAC1C\uC6D4"] = "01";
|
|
8
|
+
CardQuotaEnum["2\uAC1C\uC6D4"] = "02";
|
|
9
|
+
CardQuotaEnum["3\uAC1C\uC6D4"] = "03";
|
|
10
|
+
CardQuotaEnum["4\uAC1C\uC6D4"] = "04";
|
|
11
|
+
CardQuotaEnum["5\uAC1C\uC6D4"] = "05";
|
|
12
|
+
CardQuotaEnum["6\uAC1C\uC6D4"] = "06";
|
|
13
|
+
CardQuotaEnum["7\uAC1C\uC6D4"] = "07";
|
|
14
|
+
CardQuotaEnum["8\uAC1C\uC6D4"] = "08";
|
|
15
|
+
CardQuotaEnum["9\uAC1C\uC6D4"] = "09";
|
|
16
|
+
CardQuotaEnum["10\uAC1C\uC6D4"] = "10";
|
|
17
|
+
CardQuotaEnum["11\uAC1C\uC6D4"] = "11";
|
|
18
|
+
CardQuotaEnum["12\uAC1C\uC6D4"] = "12";
|
|
19
|
+
})(CardQuotaEnum || (exports.CardQuotaEnum = CardQuotaEnum = {}));
|
|
20
|
+
var ReservationCancelTypeEnum;
|
|
21
|
+
(function (ReservationCancelTypeEnum) {
|
|
22
|
+
/** 예약 매칭 실패로 취소됨 */
|
|
23
|
+
ReservationCancelTypeEnum["reserveMatchFailed"] = "reserveMatchFailed";
|
|
24
|
+
/** 예약 취소 요청으로 취소됨*/
|
|
25
|
+
ReservationCancelTypeEnum["reserveCancelAsk"] = "reserveCancelAsk";
|
|
26
|
+
})(ReservationCancelTypeEnum || (exports.ReservationCancelTypeEnum = ReservationCancelTypeEnum = {}));
|
|
27
|
+
var ReservationCancelReasonEnum;
|
|
28
|
+
(function (ReservationCancelReasonEnum) {
|
|
29
|
+
/** 유저 직접 취소 */
|
|
30
|
+
ReservationCancelReasonEnum["userCancel"] = "userCancel";
|
|
31
|
+
/** 재고 부족으로 매칭 실패 */
|
|
32
|
+
ReservationCancelReasonEnum["matchingFailedStock"] = "matchingFailedStock";
|
|
33
|
+
/** 결제 실패로 매칭 실패 */
|
|
34
|
+
ReservationCancelReasonEnum["matchingFailedPayment"] = "matchingFailedPayment";
|
|
35
|
+
})(ReservationCancelReasonEnum || (exports.ReservationCancelReasonEnum = ReservationCancelReasonEnum = {}));
|
|
36
|
+
var PInfoTypeEnum;
|
|
37
|
+
(function (PInfoTypeEnum) {
|
|
38
|
+
PInfoTypeEnum["normal"] = "normal";
|
|
39
|
+
PInfoTypeEnum["card"] = "card";
|
|
40
|
+
PInfoTypeEnum["reservation"] = "reservation";
|
|
41
|
+
})(PInfoTypeEnum || (exports.PInfoTypeEnum = PInfoTypeEnum = {}));
|
|
4
42
|
var POptionTypeEnum;
|
|
5
43
|
(function (POptionTypeEnum) {
|
|
6
44
|
POptionTypeEnum["single"] = "single";
|
package/user/index.d.ts
CHANGED
package/user/index.js
CHANGED
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./user.entity"), exports);
|
|
18
18
|
__exportStar(require("./user-for-admin.entity"), exports);
|
|
19
19
|
__exportStar(require("./user-shipping-addresses.entity"), exports);
|
|
20
|
+
__exportStar(require("./user-card-billing.entity"), exports);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Types } from 'mongoose';
|
|
2
|
+
/** 유저 카드 빌링 타입 */
|
|
3
|
+
export declare enum UserCardBillingEnum {
|
|
4
|
+
/** 나이스 페이 빌링 키 */
|
|
5
|
+
nicepay_billing = "nicepay_billing"
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* NicePay 빌키 발급 API 원본 응답 인터페이스
|
|
9
|
+
* @see https://developers.nicepay.co.kr/manual-card-billkey-auth-create.php
|
|
10
|
+
*/
|
|
11
|
+
export interface NicepayBillingKeyApiResponse {
|
|
12
|
+
/** 결과 코드 (F100: 성공) */
|
|
13
|
+
ResultCode: string;
|
|
14
|
+
/** 결과 메시지 */
|
|
15
|
+
ResultMsg: string;
|
|
16
|
+
/** 거래 ID */
|
|
17
|
+
TID: string;
|
|
18
|
+
/** 빌키 */
|
|
19
|
+
BID: string;
|
|
20
|
+
/** 빌키 발급일자 (YYYYMMDD) */
|
|
21
|
+
AuthDate: string;
|
|
22
|
+
/** 카드사 코드 */
|
|
23
|
+
CardCode: string;
|
|
24
|
+
/** 카드사명 */
|
|
25
|
+
CardName: string;
|
|
26
|
+
/** 카드 타입 (0: 신용, 1: 체크) */
|
|
27
|
+
CardCl: string;
|
|
28
|
+
/** 매입 카드사 코드 */
|
|
29
|
+
AcquCardCode: string;
|
|
30
|
+
/** 매입 카드사명 */
|
|
31
|
+
AcquCardName: string;
|
|
32
|
+
/** 마스킹된 카드번호 */
|
|
33
|
+
CardNo: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @author jun
|
|
37
|
+
* @description 유저 카드 빌링 정보 엔티티
|
|
38
|
+
* @process 유저의 카드 빌링키 및 카드 정보를 저장
|
|
39
|
+
*/
|
|
40
|
+
export interface UserCardBillingEntity {
|
|
41
|
+
_id: Types.ObjectId;
|
|
42
|
+
/** 카드 빌링 타입 */
|
|
43
|
+
type: UserCardBillingEnum;
|
|
44
|
+
/** 유저 아이디 */
|
|
45
|
+
userId: Types.ObjectId;
|
|
46
|
+
/** 빌링키 */
|
|
47
|
+
billingKey: string;
|
|
48
|
+
/** 카드사명 (ex: 신한카드) */
|
|
49
|
+
cardCompany: string;
|
|
50
|
+
/** 마스킹된 카드번호 뒷 4자리 (ex: 1234) */
|
|
51
|
+
cardNumberLast4: string;
|
|
52
|
+
/** 등록일 */
|
|
53
|
+
regDate: Date;
|
|
54
|
+
/** NicePay 빌링키 발급 API 원본 응답 */
|
|
55
|
+
nicepayResponse?: NicepayBillingKeyApiResponse;
|
|
56
|
+
/** 보여주기 여부 */
|
|
57
|
+
isView: boolean;
|
|
58
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserCardBillingEnum = void 0;
|
|
4
|
+
/** 유저 카드 빌링 타입 */
|
|
5
|
+
var UserCardBillingEnum;
|
|
6
|
+
(function (UserCardBillingEnum) {
|
|
7
|
+
/** 나이스 페이 빌링 키 */
|
|
8
|
+
UserCardBillingEnum["nicepay_billing"] = "nicepay_billing";
|
|
9
|
+
})(UserCardBillingEnum || (exports.UserCardBillingEnum = UserCardBillingEnum = {}));
|