정산시스템ERD2026
테이블 (8)
categories
- id — BIGINT — 기본 키 — NOT NULL
- large_category — VARCHAR(50) — NOT NULL
- medium_category — VARCHAR(50) — NOT NULL
- small_category — VARCHAR(50) — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
commission
- ID — VARCHAR(20) — 기본 키 — NOT NULL
- date — VARCHAR(8) — NOT NULL
- smallCategory — VARCHAR(50) — NOT NULL
- commissionCount — INT
- commissionAmount — INT
- channel — INT — NOT NULL
delivery_fees
- id — BIGINT — 기본 키 — NOT NULL
- order_number — VARCHAR(50)
- platform — ENUM('nongra','coupang','smartstore')
- shipping_included — TINYINT(1)
- total_delivery_fee — INT — NOT NULL
- unit_price — INT — NOT NULL
- shipping_count — INT
- order_date — DATE — NOT NULL
- created_at — DATETIME
- category_id — BIGINT
expenses
- id — BIGINT — 기본 키 — NOT NULL
- expense_date — DATE — NOT NULL
- expense_time — TIME
- category_id — BIGINT — NOT NULL
- expense_type — ENUM('SHIPPING','PACKAGING','MACHINE_RENTAL','TAX_FREE_FUEL','FUEL','LABOR','AGROCHEMICAL','COMMISSION')
- unit_cost — INT
- quantity — INT
- total_cost — INT — NOT NULL
- description — VARCHAR(500) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
products
- id — BIGINT — 기본 키 — NOT NULL
- product_name — VARCHAR(100) — NOT NULL
- unit_price — INT — NOT NULL
- unit_cnt — INT
- platform — ENUM('nongra','coupang','smartstore') — NOT NULL
- category_id — BIGINT
- shipping_included — TINYINT(1)
- start_date — DATE — NOT NULL
- end_date — DATE
- active — TINYINT(1)
- created_at — DATETIME
- updated_at — DATETIME
purchases
- id — BIGINT — 기본 키 — NOT NULL
- product_id — BIGINT
- category_id — BIGINT
- purchase_date — DATE — NOT NULL
- purchase_time — TIME
- quantity — INT — NOT NULL
- unit_cost — INT — NOT NULL
- total_cost — INT — NOT NULL
- supplier_name — VARCHAR(500) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME
sales
- id — BIGINT — 기본 키 — NOT NULL
- order_number — VARCHAR(50) — NOT NULL
- platform — ENUM('nongra','coupang','smartstore')
- product_name_raw — VARCHAR(200) — NOT NULL
- product_id — BIGINT
- quantity — INT — NOT NULL
- product_total — INT — NOT NULL
- unit_price — INT — NOT NULL
- shipping_included — TINYINT(1)
- order_date — DATE — NOT NULL
- created_at — DATETIME
users
- username — VARCHAR(50) — 기본 키 — NOT NULL
- password — VARCHAR(100) — NOT NULL