subscription product group

Tables (10)

BillingInfo (유저 결제 정보)

  • id (primary key) — int — Primary key — NOT NULL
  • userId (유저 아이디) — int — Foreign key → User.id — NOT NULL
  • subscriptionOrderId (주문 아이디) — int — Foreign key → SubscriptionOrder.id — NOT NULL
  • billingKey (결제 빌링키) — string
  • publisher (카드사) — string
  • number (카드 번호) — string
  • status (만료 상태) — enum
  • createdAt (생성 일시) — DateTime
  • updatedAt (업데이트 시간) — DateTime

Payment (결제 내역)

  • id (primary key) — int — Primary key — NOT NULL
  • subscriptionOrderId (주문 아이디) — int — Foreign key → SubscriptionOrder.id — NOT NULL
  • billinInfoId (결제 아이디) — int — Foreign key → BillingInfo.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
  • subscriptionOrderId (주문 아이디) — 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
  • subscriptionProductId (상품 아이디) — int — Foreign key → SubscriptionProduct.id — 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

SubscriptionProduct (상품)

  • id (primary key) — int — Primary key — NOT NULL
  • productGroupId (상품 그룹 아이디) — int — Foreign key → ProductGroup.id — NOT NULL
  • created_at (생성일) — DateTime — NOT NULL
  • updated_at (수정일) — DateTime — NOT NULL
  • status (상품 상태) — enum — NOT NULL
  • description (상품 설명) — int — Foreign key → i18n_data.auto_id — NOT NULL
  • 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
  • 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