
-- ----------------------------
-- 成品表
-- ----------------------------
CREATE TABLE `hazmat_manage`.`hz_product_0`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_1`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_2`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_3`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_4`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;

CREATE TABLE `hazmat_manage`.`hz_product_5`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_6`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_7`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_8`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_9`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;

CREATE TABLE `hazmat_manage`.`hz_product_10`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_11`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_12`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_13`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_14`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_15`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_16`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_17`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_18`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;


CREATE TABLE `hazmat_manage`.`hz_product_19`  (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` bigint NOT NULL COMMENT '入库记录id',
`basic_id` bigint NOT NULL COMMENT '成品基础信息id',
`warehouse_id` bigint NOT NULL COMMENT '仓库id',
`remaining` decimal(12, 2) NOT NULL DEFAULT 0 COMMENT '在库容量',
`state` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0在库，5已销售，4标签作废)',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`company_id` bigint NOT NULL COMMENT '企业id',
`code` varchar(20) NOT NULL COMMENT '条码code',
`create_by` varchar(20) NULL,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_by` varchar(20) NULL,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `index_code`(`code`,`company_id`) USING BTREE,
INDEX `index_basic`(`basic_id`) USING BTREE,
INDEX `index_basic_warehouse`(`basic_id`, `warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成品表' ROW_FORMAT = Dynamic;