wallet
Tables (15)
activity_product
- id — BIGINT — Primary key — NOT NULL
- type — VARCHAR(10) — NOT NULL
- name — VARCHAR(100) — NOT NULL
- location — VARCHAR(100)
- activity_datetime — DATETIME
- total_quantity — INT — NOT NULL
- remaining_quantity — INT — NOT NULL
- source — VARCHAR(20)
advice_pool
- id — BIGINT — Primary key — NOT NULL
- target — VARCHAR(10) — NOT NULL
- content — VARCHAR(300) — NOT NULL
allowance
- id — BIGINT — Primary key — NOT NULL
- child_id — BIGINT — Foreign key → users.id — NOT NULL
- amount — BIGINT — NOT NULL
- cycle — VARCHAR(10) — NOT NULL
- next_payment_date — DATE — NOT NULL
- status — VARCHAR(10) — NOT NULL
budget
- id — BIGINT — Primary key — NOT NULL
- child_id — BIGINT — Foreign key → users.id — NOT NULL
- budget_month — VARCHAR(7) — NOT NULL
- category_id — BIGINT — Foreign key → category.id
- limit_amount — BIGINT — NOT NULL
category
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(30) — 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
- category_breakdown — TEXT
- summary_child — TEXT
- summary_parent — 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)
- interest_set_at — DATETIME
- completed_at — DATETIME
- notified_at — DATETIME
- paid_at — DATETIME
- is_favorite — BOOLEAN — NOT NULL
goal_deposit
- id — BIGINT — Primary key — NOT NULL
- goal_id — BIGINT — Foreign key → goal.id — NOT NULL
- amount — BIGINT — NOT NULL
- deposited_at — DATETIME — 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
- category_id — BIGINT — Foreign key → category.id
- goal_id — BIGINT — Foreign key → goal.id
- status — VARCHAR(10) — NOT NULL
- fail_reason — VARCHAR(100)
- balance_after — BIGINT — NOT NULL
- created_at — DATETIME — NOT NULL
merchant
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- category_id — BIGINT — Foreign key → category.id — 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
- message — VARCHAR(200)
- 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
reservation
- id — BIGINT — Primary key — NOT NULL
- child_id — BIGINT — Foreign key → users.id — NOT NULL
- product_id — BIGINT — Foreign key → activity_product.id — NOT NULL
- quantity — INT — NOT NULL
- status — VARCHAR(10) — NOT NULL
- created_at — DATETIME — NOT NULL
users
- id — BIGINT — Primary key — NOT NULL
- social_id — VARCHAR(100) — NOT NULL
- name — VARCHAR(50) — NOT NULL
- profile_image_url — VARCHAR(300)
- role — VARCHAR(10)
- parent_id — BIGINT — Foreign key → users.id
- invite_code — VARCHAR(10)
- 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