This commit is contained in:
2026-09-03 15:35:26 +08:00
parent 6eff5a4b9b
commit 36d35276b7
10 changed files with 307 additions and 123 deletions
@@ -207,6 +207,7 @@ CREATE TABLE IF NOT EXISTS fl_inbound_split_item (
UNIQUE KEY uk_inbound_split_batch_line (tenant_id, split_batch_id, line_no),
UNIQUE KEY uk_inbound_split_batch_source_child (tenant_id, split_batch_id, source_measurement_item_id, child_inbound_id),
KEY idx_inbound_split_detail (tenant_id, source_inbound_detail_id, created_at),
KEY idx_inbound_split_candidate (tenant_id, parent_inbound_id, source_inbound_detail_id),
CONSTRAINT chk_inbound_split_item_package CHECK (package_count > 0),
CONSTRAINT fk_inbound_split_item_batch FOREIGN KEY (split_batch_id) REFERENCES fl_inbound_split_batch (id),
CONSTRAINT fk_inbound_split_item_parent FOREIGN KEY (parent_inbound_id) REFERENCES fl_inbound_order (id),