wallet2

Tables (13)

advice_pool

  • id — BIGINT — Primary key — NOT NULL
  • pattern_type — VARCHAR(30) — NOT NULL
  • target — VARCHAR(10) — NOT NULL
  • content — VARCHAR(300) — NOT NULL

article

  • id — BIGINT — Primary key — NOT NULL
  • title — VARCHAR(200) — NOT NULL
  • content — TEXT
  • original_url — VARCHAR(500) — NOT NULL
  • mission_type — VARCHAR(30) — NOT NULL
  • published_at — DATETIME — NOT NULL

article_response

  • id — BIGINT — Primary key — NOT NULL
  • article_id — BIGINT — Foreign key → article.id — NOT NULL
  • child_id — BIGINT — Foreign key → users.id — NOT NULL
  • content — VARCHAR(500) — NOT NULL
  • is_completed — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL

consumption_report

  • id — BIGINT — Primary key — NOT NULL
  • child_id — BIGINT — Foreign key → users.id — NOT NULL
  • report_month — VARCHAR(7) — NOT NULL
  • pattern_type — VARCHAR(30)
  • total_amount — BIGINT — NOT NULL
  • diff_amount — BIGINT
  • transaction_count — INT — NOT NULL
  • merchant_breakdown — TEXT
  • generated_at — DATETIME — NOT NULL
  • is_read_parent — BOOLEAN — NOT NULL
  • is_read_child — BOOLEAN — NOT NULL

goal

  • id — BIGINT — Primary key — NOT NULL
  • child_id — BIGINT — Foreign key → users.id — NOT NULL
  • purpose — VARCHAR(50) — NOT NULL
  • target_amount — BIGINT — NOT NULL
  • current_amount — BIGINT — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • first_deposit_at — DATETIME
  • interest_type — VARCHAR(10)
  • interest_value — DECIMAL(10,2)
  • completed_at — DATETIME
  • paid_at — DATETIME
  • is_favorite — BOOLEAN — NOT NULL

ledger

  • id — BIGINT — Primary key — NOT NULL
  • wallet_id — BIGINT — Foreign key → wallet.id
  • parent_account_id — BIGINT — Foreign key → parent_account.id
  • amount — BIGINT — NOT NULL
  • direction — VARCHAR(3) — NOT NULL
  • type — VARCHAR(20) — NOT NULL
  • merchant_id — BIGINT — Foreign key → merchant.id
  • goal_id — BIGINT — Foreign key → goal.id
  • original_ledger_id — BIGINT — Foreign key → ledger.id
  • balance_after — BIGINT — NOT NULL
  • created_at — DATETIME — NOT NULL

merchant

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • is_restricted — BOOLEAN — NOT NULL

notification

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • type — VARCHAR(40) — NOT NULL
  • related_type — VARCHAR(20)
  • related_id — BIGINT
  • created_at — DATETIME — NOT NULL

parent_account

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • bank_name — VARCHAR(30)
  • masked_account_number — VARCHAR(30)
  • balance — BIGINT — NOT NULL

payment_attempt_log

  • id — BIGINT — Primary key — NOT NULL
  • wallet_id — BIGINT — Foreign key → wallet.id — NOT NULL
  • merchant_id — BIGINT — Foreign key → merchant.id
  • amount — BIGINT — NOT NULL
  • fail_reason — VARCHAR(100) — NOT NULL
  • attempted_at — DATETIME — NOT NULL

transaction_attempt_log

  • id — BIGINT — Primary key — NOT NULL
  • wallet_id — BIGINT
  • parent_account_id — BIGINT
  • type — VARCHAR(20) — NOT NULL
  • amount — BIGINT — NOT NULL
  • merchant_id — BIGINT
  • goal_id — BIGINT
  • fail_reason_code — VARCHAR(30) — NOT NULL
  • attempted_at — DATETIME — NOT NULL

users

  • id — BIGINT — Primary key — NOT NULL
  • login_type — VARCHAR(10) — NOT NULL
  • social_id — VARCHAR(100)
  • email — VARCHAR(100)
  • password — VARCHAR(200)
  • name — VARCHAR(50) — NOT NULL
  • profile_image_url — VARCHAR(300)
  • role — VARCHAR(10)
  • parent_id — BIGINT — Foreign key → users.id
  • invite_code — VARCHAR(10)
  • status — VARCHAR(10) — NOT NULL
  • created_at — DATETIME — NOT NULL

wallet

  • id — BIGINT — Primary key — NOT NULL
  • child_id — BIGINT — Foreign key → users.id — NOT NULL
  • balance — BIGINT — NOT NULL
  • updated_at — DATETIME — NOT NULL