From f6f57ba70679a0b050031f3cdf81b5bf5d4cbd60 Mon Sep 17 00:00:00 2001 From: liding <756868258@qq.com> Date: 星期五, 11 七月 2025 15:28:37 +0800 Subject: [PATCH] 1.生产加工优化 2.销售,库存查询优化 --- main-business/src/main/resources/db/migration/postgresql/V20250611160300__create_table_sales_record.sql | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/main-business/src/main/resources/db/migration/postgresql/V20250611160300__create_table_sales_record.sql b/main-business/src/main/resources/db/migration/postgresql/V20250611160300__create_table_sales_record.sql index 082816e..f26b885 100644 --- a/main-business/src/main/resources/db/migration/postgresql/V20250611160300__create_table_sales_record.sql +++ b/main-business/src/main/resources/db/migration/postgresql/V20250611160300__create_table_sales_record.sql @@ -5,8 +5,7 @@ sale_date DATE NOT NULL, -- 閿�鍞棩鏈� customer_id BIGINT, -- 瀹㈡埛id customer VARCHAR(255) NOT NULL, -- 瀹㈡埛 - coal_id VARCHAR(255) NOT NULL, -- 鐓ょ id - coal VARCHAR(255) NOT NULL, -- 鐓ょ + coal_id BIGINT NOT NULL, -- 鐓ょ id price_including_tax DECIMAL(10, 2) NOT NULL, -- 鍗曚环锛堝惈绋庯級 inventory_quantity DECIMAL(10, 0) NOT NULL, -- 搴撳瓨鏁伴噺 unit VARCHAR(100) NOT NULL, -- 鍗曚綅 @@ -19,8 +18,8 @@ gross_profit DECIMAL(10, 2), -- 姣涘埄娑� net_profit DECIMAL(10, 2), -- 鍑�鍒╂鼎 registrant_id BIGINT, -- 鐧昏浜篿d - registrant VARCHAR(255) NOT NULL, -- 鐧昏浜� - registration_date DATE NOT NULL, -- 鐧昏鏃ユ湡 + registrant VARCHAR(255) , -- 鐧昏浜� + registration_date DATE , -- 鐧昏鏃ユ湡 create_time TIMESTAMP WITHOUT TIME ZONE, -- 涓婁紶鏃堕棿锛岄粯璁ゅ綋鍓嶆椂闂� update_time TIMESTAMP WITHOUT TIME ZONE, -- 鏈�鍚庢洿鏂版椂闂达紝榛樿褰撳墠鏃堕棿 @@ -37,7 +36,6 @@ COMMENT ON COLUMN sales_record.sale_date IS '閿�鍞棩鏈�'; COMMENT ON COLUMN sales_record.customer IS '瀹㈡埛'; COMMENT ON COLUMN sales_record.customer_id IS '瀹㈡埛id'; -COMMENT ON COLUMN sales_record.coal IS '鐓ょ'; COMMENT ON COLUMN sales_record.coal_id IS '鐓ょid'; COMMENT ON COLUMN sales_record.unit IS '鍗曚綅'; COMMENT ON COLUMN sales_record.price_including_tax IS '鍗曚环锛堝惈绋庯級'; -- Gitblit v1.9.3