membershipFlow
Tables (9)
alert_log
- id — BIGINT — Primary key — NOT NULL
- watchlist_id — BIGINT — Foreign key → watchlist.id — NOT NULL
- triggered_price — BIGINT — NOT NULL
- source_id — BIGINT — Foreign key → crawl_source.id — NOT NULL
- sent_at — DATETIME — NOT NULL
crawl_source
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
- base_url — VARCHAR(500) — NOT NULL
- crawl_type — VARCHAR(20) — NOT NULL
- active — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
member
- id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255)
- nickname — VARCHAR(100)
- provider — VARCHAR(20) — NOT NULL
- provider_id — VARCHAR(255) — NOT NULL
- name — VARCHAR(100)
- profile_image_url — VARCHAR(500)
- role — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
membership_course
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(200) — NOT NULL
- region — VARCHAR(100)
- course_type — VARCHAR(20) — NOT NULL
- membership_type — VARCHAR(20) — NOT NULL
- active — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
payment_history
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → member.id — NOT NULL
- subscription_id — BIGINT — Foreign key → subscription.id — NOT NULL
- toss_order_id — VARCHAR(64) — NOT NULL
- toss_payment_key — VARCHAR(200)
- amount — INT — NOT NULL
- status — VARCHAR(20) — NOT NULL
- billed_at — DATETIME — NOT NULL
- fail_reason — VARCHAR(500)
price_history
- id — BIGINT — Primary key — NOT NULL
- course_id — BIGINT — Foreign key → membership_course.id — NOT NULL
- source_id — BIGINT — Foreign key → crawl_source.id — NOT NULL
- price — BIGINT — NOT NULL
- collected_at — DATETIME — NOT NULL
subscription
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → member.id — NOT NULL
- plan_id — BIGINT — Foreign key → subscription_plan.id — NOT NULL
- status — VARCHAR(20) — NOT NULL
- billing_key — VARCHAR(500) — NOT NULL
- customer_key — VARCHAR(300) — NOT NULL
- card_number_masked — VARCHAR(50)
- card_company — VARCHAR(50)
- fail_count — INT — NOT NULL
- started_at — DATETIME — NOT NULL
- next_billing_at — DATETIME — NOT NULL
- cancelled_at — DATETIME
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
subscription_plan
- id — BIGINT — Primary key — NOT NULL
- code — VARCHAR(20) — NOT NULL
- name — VARCHAR(100) — NOT NULL
- price — INT — NOT NULL
- description — VARCHAR(500)
- active — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
watchlist
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → member.id — NOT NULL
- course_id — BIGINT — Foreign key → membership_course.id — NOT NULL
- target_price — BIGINT
- alert_yn — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL