test
Tables (7)
account
- account_id — BIGINT — Primary key — NOT NULL
- business_id — BIGINT — Foreign key → business_registration.business_id — NOT NULL
- user_id — BIGINT — NOT NULL
- account_num — VARCHAR(20)
- balance — BIGINT
account_history
- history_id — BIGINT — Primary key — NOT NULL
- account_id — BIGINT — Foreign key → account.account_id — NOT NULL
- transaction_type — ENUM('매출', '지출')
- transaction_date — TIMESTAMP
- amount — BIGINT
- balance_after — BIGINT
- category — VARCHAR(50) — 임대료, 운영비...
- note — TEXT
- fixed_expenses — BOOLEAN
- store_name — VARCHAR(50)
business_category
- category_id — BIGINT — Primary key — NOT NULL
- category_name — VARCHAR(50)
- description — VARCHAR(255)
business_registration
- business_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- category_id — BIGINT — Foreign key → business_category.category_id — NOT NULL
- br_num — BIGINT
- business_start_date — VARCHAR(255)
goals
- goal_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- goal_month — DATE
- revenue_goal — BIGINT
- expenses_goal — BIGINT
- created_at — TIMESTAMP
- updated_at — TIMESTAMP
report
- report_id — BIGINT — Primary key — NOT NULL
- business_id — BIGINT — Foreign key → business_registration.business_id — NOT NULL
- report_month — DATE
- revenue — BIGINT
- expenses — BIGINT
- profit — BIGINT
- stability_rating — VARCHAR(20)
- industry_avg_revenue — BIGINT
- industry_avg_expenses — BIGINT
- industry_avg_profit — BIGINT
- bsi_index — FLOAT
- created_at — TIMESTAMP
- updated_at — TIMESTAMP
user
- user_id — BIGINT — Primary key — NOT NULL
- login_id — VARCHAR(20)
- password — VARCHAR(255)
- name — VARCHAR(50)
- address — VARCHAR(255)
- phone_number — VARCHAR(15)
- created_at — TIMESTAMP
- updated_at — TIMESTAMP
- deleted_at — TIMESTAMP