subscription
Tables (13)
BillingInfo (유저 결제 정보)
- id (primary key) — int — Primary key — NOT NULL
- userId (유저 아이디) — int — Foreign key → User.id — NOT NULL
- subscriptionOrderV2Id (주문 아이디) — int — Foreign key → SubscriptionOrder.id — NOT NULL
- id (식별자) — int — Foreign key → SubscriptionOrder.id — NOT NULL
- billingKey (결제 빌링키) — string
- publisher (카드사) — string
- number (카드 번호) — string
- status (만료 상태) — enum
- createdAt (생성 일시) — DateTime
- updatedAt (업데이트 시간) — DateTime
Coupon (쿠폰)
- id (식별자) — int — Primary key — NOT NULL
- name_auto_id (쿠폰 이름) — int — Foreign key → i18n_data.auto_id — NOT NULL
- productGroupId (상품 그룹 아이디) — int — Foreign key → ProductGroup.id — NOT NULL
- type (쿠폰 유형(FREE_TRIAL, DISCOUNT)) — enum — NOT NULL
- freeTrialPeriod (무료 체험 기간) — string
- discountRate (할인율) — int
- status (쿠폰 상태(ACTIVATED, DEACTIVATED)) — enum — NOT NULL
- createdAt (생성 날짜) — Date — NOT NULL
- updatedAt (수정 날짜) — Date — NOT NULL
- expirationDate (쿠폰 사용 만료일) — Date — NOT NULL
- isGlobal (공용 쿠폰 여부) — Boolean — NOT NULL
CouponCode (쿠폰 코드)
- id (식별자) — int — Primary key — NOT NULL
- couponId (쿠폰 ID) — int — Foreign key → Coupon.id — NOT NULL
- id (식별자2) — int — Foreign key → Coupon.productGroupId — NOT NULL
- code (쿠폰 코드) — string — NOT NULL
- createdAt (생성 날짜) — Date — NOT NULL
- updatedAt (수정 날짜) — Date — NOT NULL
Payment (결제 내역)
- id (primary key) — int — Primary key — NOT NULL
- subscriptionOrderV2Id (주문 아이디) — int — Foreign key → SubscriptionOrder.id — NOT NULL
- billinInfoId (결제 아이디) — int — Foreign key → BillingInfo.id — NOT NULL
- id (식별자) — int — Foreign key → SubscriptionOrder.id — NOT NULL
- subscriptionProductV2Id (결제 상품 아이디) — int — Foreign key → SubscriptionProduct.id — NOT NULL
- paymentId (고객사 고유 거래 번호) — string — NOT NULL
- transactionId (포트원 고유 거래 번호) — string
- pgTxId (PG사 고유 거래 번호) — string
- cancellationId (포트원 고유 결제 취소 번호) — string
- amount (결제 금액) — int — NOT NULL
- status (결제 상태) — enum — NOT NULL
- currency (통화) — enum — NOT NULL
- createdAt (생성 시간) — DateTime — NOT NULL
- updatedAt (업데이트 시간) — DateTime — NOT NULL
PaymentRequestLog (결제 로그)
- id (primary key) — int — Primary key — NOT NULL
- request (로그 데이터) — json — NOT NULL
- date (시간) — DateTime — NOT NULL
- origin (웹훅 or FrontEnd) — enum — NOT NULL
- ip (발신자 ip) — string — NOT NULL
- status (웹훅 상태) — enum — NOT NULL
ProductGroup (상품 그룹)
- id (식별자) — int — Primary key — NOT NULL
- name_auto_id (상품 그룹 이름) — int — Foreign key → i18n_data.auto_id — NOT NULL
- Field (상태(PENDING, ACTIVE, DELETED)) — enum — NOT NULL
ScheduledPayment (결제 예약)
- id (primary key) — int — Primary key — NOT NULL
- subscriptionOrderV2Id (주문 아이디) — int — Foreign key → SubscriptionOrder.id — NOT NULL
- id (식별자) — int — Foreign key → SubscriptionOrder.id — NOT NULL
- scheduleTime (다음 결제 시간) — DateTime — NOT NULL
- isRetry (실패한 경우) — int — NOT NULL
- paymentAmount (초기 환율 적용 결제 금액) — int
- createdAt (생성일) — DateTime
- updatedAt (수정일) — DateTime
SubscriptionOrder (주문 내역)
- id (primary key) — int — Primary key — NOT NULL
- userId (유저 아이디) — int — Foreign key → User.id — NOT NULL
- subscriptionProductV2Id (상품 아이디) — int — Foreign key → SubscriptionProduct.id — NOT NULL
- id (식별자) — int — Foreign key → SubscriptionProduct.couponId — NOT NULL
- status (주문 상태) — enum — NOT NULL
- expirationDate (구독 유효 기간(다음 결제일)) — DateTime — NOT NULL
- currency (통화) — enum — NOT NULL
- paymentDate (기준 결제일) — DateTime — NOT NULL
- createdAt (생성 시간) — DateTime — NOT NULL
- updatedAt (업데이트 시간) — DateTime — NOT NULL
SubscriptionOrderCoupon (구독 쿠폰 적용 내역)
- id (식별자) — int — Primary key — NOT NULL
- subscriptionOrderV2Id (주문 아이디) — int — Foreign key → SubscriptionOrder.id — NOT NULL
- couponCodeId (쿠폰 코드 ID) — int — Foreign key → CouponCode.id — NOT NULL
- status (상태 (PENDING, USED, CANCELLED )) — enum — NOT NULL
- createdAt (생성 날짜) — Date — NOT NULL
- updatedAt (수정 날짜) — Date — NOT NULL
SubscriptionProduct (상품)
- id (primary key) — int — Primary key — NOT NULL
- productGroupId (상품 그룹 아이디) — int — Foreign key → ProductGroup.id — NOT NULL
- couponId (쿠폰 아이디) — int — Foreign key → Coupon.id
- created_at (생성일) — DateTime — NOT NULL
- updated_at (수정일) — DateTime — NOT NULL
- status (상품 상태) — enum — NOT NULL
- description_auto_id_1 (상품 설명 1) — int — Foreign key → i18n_data.auto_id — NOT NULL
- description_auto_id_2 (상품 설명 2) — int — Foreign key → i18n_data.auto_id
- description_auto_id_3 (상품 설명 3) — int — Foreign key → i18n_data.auto_id
- description_auto_id_4 (상품 설명 4) — int — Foreign key → i18n_data.auto_id
- description_auto_id_5 (상품 설명 5) — int — Foreign key → i18n_data.auto_id
- name_auto_id (상품 이름) — int — Foreign key → i18n_data.auto_id
- notion_link_auto_id (노션 링크) — int — Foreign key → i18n_data.auto_id — NOT NULL
- Field (쿠폰 상품 여부) — boolean — NOT NULL
SubscriptionProductInfo (상품상세)
- id (primary key) — int — Primary key — NOT NULL
- subscription_product_v2_id (상품 아이디) — int — Foreign key → SubscriptionProduct.id — NOT NULL
- id (식별자) — int — Foreign key → SubscriptionProduct.productGroupId — NOT NULL
- id (식별자2) — int — Foreign key → SubscriptionProduct.couponId — NOT NULL
- price (가격) — int — NOT NULL
- created_at (생성일) — DateTime — NOT NULL
- updated_at (업데이트일) — DateTime — NOT NULL
- billing_cycle (결제 주기) — enum SubscriptionCycle — NOT NULL
User (유저)
- id (primary key) — int — Primary key — NOT NULL
i18n_data (번역)
- auto_id (Key) — int — Primary key — NOT NULL
- ko_KR (한국어) — string — NOT NULL
- en_US (영어) — string — NOT NULL
- vi_VN (베트남어) — string — NOT NULL