stanv2test

Tables (11)

account_log

  • account_log_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • fee — DECIMAL(15,2)
  • status — VARCHAR(20)
  • reject_reason — TEXT
  • requested_at — DATETIME
  • processed_at — DATETIME
  • completed_at — DATETIME
  • created_at — DATETIME

events

  • event_id — BIGINT — Primary key — NOT NULL
  • event_code — VARCHAR(50) — NOT NULL
  • event_name — VARCHAR(200) — NOT NULL
  • event_type — VARCHAR(30) — NOT NULL
  • description — TEXT
  • start_date — DATETIME — NOT NULL
  • end_date — DATETIME — NOT NULL
  • max_participants — INT
  • current_participants — INT
  • is_active — BOOLEAN
  • created_at — DATETIME

franchises

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • franchise_code — VARCHAR(50)
  • image_key — VARCHAR(50)
  • brand_logo_url — VARCHAR(500)
  • description — TEXT
  • is_active — BOOLEAN
  • created_at — DATETIME

gifticons

  • gifticons_id — BIGINT — Primary key — NOT NULL
  • seller_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • franchise_id — BIGINT — Foreign key → franchises.id
  • gifticons_code — VARCHAR(100)
  • product_name — VARCHAR(200) — NOT NULL
  • original_price — INT — NOT NULL
  • buy_price — BIGINT
  • sell_price — INT — NOT NULL
  • discount_rate — DECIMAL(5,2)
  • expiry_date — DATETIME
  • status — VARCHAR(20)
  • registered_at — DATETIME
  • sold_at — DATETIME
  • created_at — DATETIME
  • updated_at — DATETIME

payment_transactions

  • transaction_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • total_amount — DECIMAL(15,2) — NOT NULL
  • point_used — DECIMAL(15,2)
  • card_amount — DECIMAL(15,2)
  • membership_discount — DECIMAL(15,2)
  • final_amount — DECIMAL(15,2) — NOT NULL
  • payment_method_id — BIGINT — Foreign key → user_payment_methods.payment_method_id
  • membership_id — BIGINT — Foreign key → user_memberships.membership_id
  • payment_status — VARCHAR(20)
  • pg_transaction_id — VARCHAR(100)
  • paid_at — DATETIME
  • cancelled_at — DATETIME
  • created_at — DATETIME

stores

  • id — BIGINT — Primary key — NOT NULL
  • kakao_place_id — VARCHAR(100) — NOT NULL
  • franchise_id — BIGINT — Foreign key → franchises.id
  • name — VARCHAR(255) — NOT NULL
  • address — VARCHAR(512)
  • latitude — DECIMAL(10, 7)
  • longitude — DECIMAL(10, 7)
  • local_currency_available — BOOLEAN
  • local_currency_discount_rate — DECIMAL(5, 2)
  • parking_available — BOOLEAN
  • free_parking — BOOLEAN
  • parking_size — VARCHAR(50)
  • gifticon_available — BOOLEAN
  • is_operating — BOOLEAN
  • created_at — DATETIME
  • updated_at — DATETIME

user_gifticons

  • user_log — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • gifticons_id — BIGINT — Foreign key → gifticons.gifticons_id
  • price — DECIMAL(15,2) — NOT NULL
  • description — TEXT
  • created_at — DATETIME

user_memberships

  • membership_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • franchise_id — BIGINT — Foreign key → franchises.id
  • membership_type — VARCHAR(50) — NOT NULL
  • membership_number — VARCHAR(100)
  • membership_barcode — VARCHAR(200)
  • membership_name — VARCHAR(100)
  • discount_rate — DECIMAL(5,2)
  • point_rate — DECIMAL(5,2)
  • is_active — BOOLEAN
  • registered_at — DATETIME
  • expires_at — DATETIME
  • created_at — DATETIME
  • updated_at — DATETIME

user_payment_methods

  • payment_method_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • method_type — VARCHAR(20) — NOT NULL
  • method_name — VARCHAR(100)
  • card_company — VARCHAR(50)
  • card_number_masked — VARCHAR(20)
  • card_nickname — VARCHAR(50)
  • account_bank — VARCHAR(50)
  • account_number_masked — VARCHAR(20)
  • is_default — BOOLEAN
  • is_active — BOOLEAN
  • pg_token — VARCHAR(500)
  • billing_key — VARCHAR(500)
  • created_at — DATETIME
  • updated_at — DATETIME

user_sessions

  • session_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • session_token — VARCHAR(500) — NOT NULL
  • refresh_token — VARCHAR(500)
  • expires_at — DATETIME — NOT NULL
  • created_at — DATETIME
  • last_accessed_at — DATETIME

users

  • user_id — BIGINT — Primary key — NOT NULL
  • kakao_id — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(100)
  • email — VARCHAR(255)
  • profile_image — VARCHAR(512)
  • point — BIGINT
  • user_status — VARCHAR(20)
  • created_at — DATETIME
  • updated_at — DATETIME
  • account_number
  • bank_name