From 13222cb24554e436fd2ff3953ce0dac9ef2f1471 Mon Sep 17 00:00:00 2001 From: Hankin Date: Tue, 2 Jun 2026 14:06:56 +0800 Subject: [PATCH] guide nutrient --- 1780296013_create_guide_nutrient_log.up.sql | 13 +++++++++++++ 1780296024_create_guide_nutrient.up.sql | 15 +++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 1780296013_create_guide_nutrient_log.up.sql create mode 100644 1780296024_create_guide_nutrient.up.sql diff --git a/1780296013_create_guide_nutrient_log.up.sql b/1780296013_create_guide_nutrient_log.up.sql new file mode 100644 index 0000000..98b3506 --- /dev/null +++ b/1780296013_create_guide_nutrient_log.up.sql @@ -0,0 +1,13 @@ +CREATE TABLE `health`.`ufutx_guide_nutrient_log` ( + `id` INT NOT NULL AUTO_INCREMENT, + `order_id` INT NOT NULL COMMENT "订单id", + `food_id` INT NOT NULL COMMENT "食物id", + `type` TINYINT DEFAULT 1 COMMENT "类型,1:系统自动,2:商务专员", + `num` DOUBLE(8, 2) NOT NULL COMMENT "数量", + `remain_num` DOUBLE(8, 2) NOT NULL COMMENT "剩余量", + `comment` VARCHAR(191) DEFAULT NULL COMMENT "备注", + `operate_user_id` INTEGER DEFAULT NULL COMMENT "操作用户", + `created_at` TIMESTAMP NULL DEFAULT NULL, + `updated_at` TIMESTAMP NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE = InnoDB COMMENT = '餐单营养素消耗记录'; \ No newline at end of file diff --git a/1780296024_create_guide_nutrient.up.sql b/1780296024_create_guide_nutrient.up.sql new file mode 100644 index 0000000..60a2a97 --- /dev/null +++ b/1780296024_create_guide_nutrient.up.sql @@ -0,0 +1,15 @@ +CREATE TABLE `health`.`ufutx_guide_nutrient` ( + `id` INT NOT NULL AUTO_INCREMENT, + `order_id` INT NOT NULL COMMENT "订单id", + `food_id` INT NOT NULL COMMENT "食物id", + `name` VARCHAR(100) NOT NULL COMMENT "名称", + `copies` INT NOT NULL COMMENT "总份数", + `quantity` INT NOT NULL COMMENT "每一份的量", + `total_num` DOUBLE(8, 2) NOT NULL COMMENT "总量数", + `remain_num` DOUBLE(8, 2) NOT NULL COMMENT "剩余量数", + `unit` VARCHAR(10) DEFAULT NULL COMMENT "单位", + `status` TINYINT DEFAULT 0 COMMENT "状态,0:已用完,1:正常,2:不足", + `created_at` TIMESTAMP NULL DEFAULT NULL, + `updated_at` TIMESTAMP NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE = InnoDB COMMENT = '餐单营养素库存'; \ No newline at end of file