WMS
Tables (9)
history
- history_id — INT — Primary key — NOT NULL
- inventory_id — INT — Foreign key → inventory.inventory_id — NOT NULL
- inbound_detail_id — INT — Foreign key → inbound_detail.inbound_detail_id
- outbound_detail_id — INT — Foreign key → outbound_detail.outbound_detail_id
- change_type — VARCHAR(20) — NOT NULL
- physical_qty_change — INT — NOT NULL
- reserved_qty_change — INT — NOT NULL
- physical_qty_after — INT — NOT NULL
- reserved_qty_after — INT — NOT NULL
- changed_at — DATETIME — NOT NULL
inbound
- inbound_id — INT — Primary key — NOT NULL
- inbound_no — VARCHAR(30) — NOT NULL
- partner_id — INT — Foreign key → partner.partner_id — NOT NULL
- expected_date — DATE — NOT NULL
- completed_date — DATETIME
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
inbound_detail
- inbound_detail_id — INT — Primary key — NOT NULL
- inbound_id — INT — Foreign key → inbound.inbound_id — NOT NULL
- product_id — INT — Foreign key → product.product_id — NOT NULL
- expected_qty — INT — NOT NULL
- actual_qty — INT
- expiry_date — DATE
- discrepancy_reason — VARCHAR(200)
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
inventory
- inventory_id — INT — Primary key — NOT NULL
- product_id — INT — Foreign key → product.product_id — NOT NULL
- physical_qty — INT — NOT NULL
- reserved_qty — INT — NOT NULL
- location_id — INT — Foreign key → location.location_id — NOT NULL
- expiry_date — DATE — NOT NULL
location
- location_id — INT — Primary key — NOT NULL
- location_code — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
outbound
- outbound_id — INT — Primary key — NOT NULL
- outbound_no — VARCHAR(30) — NOT NULL
- partner_id — INT — Foreign key → partner.partner_id — NOT NULL
- expected_date — DATE — NOT NULL
- completed_date — DATE
- status — VARCHAR(20) — NOT NULL
- updated_at — DATETIME — NOT NULL
outbound_detail
- outbound_detail_id — INT — Primary key — NOT NULL
- outbound_id — INT — Foreign key → outbound.outbound_id — NOT NULL
- product_id — INT — Foreign key → product.product_id — NOT NULL
- requested_qty — INT — NOT NULL
- reserved_qty — INT — NOT NULL
- shipped_qty — INT
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
partner
- partner_id — INT — Primary key — NOT NULL
- partner_name — VARCHAR(50) — NOT NULL
- partner_type — VARCHAR(50) — NOT NULL
- contact — VARCHAR(50)
product
- product_id — INT — Primary key — NOT NULL
- product_code — VARCHAR(20) — NOT NULL
- product_name — VARCHAR(50) — NOT NULL
- spec — VARCHAR(20)
- unit — VARCHAR(10) — NOT NULL
- active — CHAR(1) — NOT NULL
- min_ship_days — INT — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL