team5
Tables (21)
approval_lines (승인단계)
- id — BIGINT — Primary key — NOT NULL
- pr_id — BIGINT — Foreign key → purchase_requests.id — NOT NULL
- approver_id — BIGINT — Foreign key → users.id — NOT NULL
- step — INT
- status — VARCHAR(30)
- comment — VARCHAR(255) — ARCHAR(255
asns (납품)
- id — BIGINT — Primary key
- po_id — BIGINT — Foreign key → purchase_orders.id — NOT NULL
- asn_number — VARCHAR(50)
- scheduled_date — DATE
- status — VARCHAR(30)
bids (입찰)
- id — BIGINT — Primary key
- proposal_id — BIGINT — Foreign key → proposals.id — NOT NULL
- supplier_id — BIGINT — Foreign key → suppliers.id — NOT NULL
- bid_amount — DECIMAL(15,2)
- is_selected — BOOLEAN
contracts (계약)
- id — BIGINT — Primary key
- pr_id — BIGINT — Foreign key → purchase_requests.id — NOT NULL
- supplier_id — BIGINT — Foreign key → suppliers.id — NOT NULL
- title — VARCHAR(200)
- amount — DECIMAL(15,2)
- status — VARCHAR(30)
- is_eco — BOOLEAN
delivery_schedules (배송날짜)
- id — BIGINT — Primary key
- po_id — BIGINT — Foreign key → purchase_orders.id — NOT NULL
- scheduled_date — DATE
- actual_date — DATE
- status — VARCHAR(30)
departments (부서)
- id — BIGINT — Primary key
- name — VARCHAR(100)
- approver1_id — BIGINT
- budget_limit — DECIMAL(15,2)
esg_scores (ESG점수)
- id — BIGINT — Primary key
- supplier_id — BIGINT — Foreign key → suppliers.id — NOT NULL
- env_score — DECIMAL(5,2)
- social_score — DECIMAL(5,2)
- gov_score — DECIMAL(5,2)
goods_receipts (뭂품영수증)
- id — BIGINT — Primary key
- asn_id — BIGINT — Foreign key → asns.id — NOT NULL
- inspector_id — BIGINT
- received_qty — INT
- result — VARCHAR(50)
notifications (알림)
- id — BIGINT — Primary key
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- type — VARCHAR(50)
- title — VARCHAR(100)
- is_read — BOOLEAN
po_items (발주품목)
- id — BIGINT — Primary key
- po_id — BIGINT — Foreign key → purchase_orders.id — NOT NULL
- item_name — VARCHAR(100)
- quantity — INT
- unit_price — DECIMAL(15,2)
pr_items (요청품목)
- id — BIGINT — Primary key
- pr_id — BIGINT — Foreign key → purchase_requests.id — NOT NULL
- item_name — VARCHAR(100)
- category — VARCHAR(100)
- quantity — INT
- unit_price (단가) — DECIMAL(15,2)
- price — DECIMAL(15,2)
- amount_unit (금액단위) — VARCHAR(255)
proposals (제안)
- id — BIGINT — Primary key
- pr_id — BIGINT — Foreign key → purchase_requests.id — NOT NULL
- buyer_id — BIGINT — Foreign key → users.id — NOT NULL
- deadline — DATETIME
- status — VARCHAR(30)
purchase_orders (발주)
- id — BIGINT — Primary key
- po_number — VARCHAR(50)
- contract_id — BIGINT — Foreign key → contracts.id — NOT NULL
- total_amount — DECIMAL(15,2)
- status — VARCHAR(30)
purchase_requests (구매요청)
- id — BIGINT — Primary key
- pr_number — VARCHAR(50)
- requester_id — BIGINT — Foreign key → users.id — NOT NULL
- title — VARCHAR(200)
- total_amount — DECIMAL(15,2)
- status — VARCHAR(30)
suppliers (발주처)
- id — BIGINT — Primary key
- name — VARCHAR(100)
- biz_no — VARCHAR(30)
- esg_score — DECIMAL(5,2)
- esg_grade — VARCHAR(10)
- status — VARCHAR(30)
tax_invoice_items (세금물품내역)
- id — BIGINT — Primary key
- invoice_id — BIGINT — Foreign key → tax_invoices.id — NOT NULL
- item_name — VARCHAR(100)
- quantity — INT
- unit_price — DECIMAL(15,2)
- amount — DECIMAL(15,2)
tax_invoices (세금계산서)
- id — BIGINT — Primary key
- invoice_number — VARCHAR(50)
- po_id — BIGINT — Foreign key → purchase_orders.id — NOT NULL
- supply_amount — DECIMAL(15,2)
- tax_amount — DECIMAL(15,2)
- total_amount — DECIMAL(15,2)
- status — VARCHAR(30)
users (사용자)
- id — BIGINT — Primary key
- name — VARCHAR(50)
- email — VARCHAR(100)
- password — VARCHAR(255)
- role — VARCHAR(30)
- dept_id — BIGINT — Foreign key → departments.id — NOT NULL
warehouse (창고)
- id — BIGINT — Primary key
- stock (재고)
- item (물건)