/*
 Navicat Premium Data Transfer

 Source Server         : dockerMySql
 Source Server Type    : MySQL
 Source Server Version : 50744
 Source Host           : 127.0.0.1:3306
 Source Schema         : cv

 Target Server Type    : MySQL
 Target Server Version : 50744
 File Encoding         : 65001

 Date: 12/03/2026 16:47:49
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for cv_devp
-- ----------------------------
DROP TABLE IF EXISTS `cv_devp`;
CREATE TABLE `cv_devp`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `dev_no` int(11) NULL DEFAULT NULL COMMENT '编号',
  `dec_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备描述',
  `in_enable` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '可入',
  `out_enable` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '可出',
  `autoing` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '自动',
  `loading` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '有物',
  `canining` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '能入',
  `canouting` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '能出',
  `wrk_no` int(11) NULL DEFAULT NULL COMMENT '工作号',
  `barcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '条形码',
  `loc_type` smallint(6) NULL DEFAULT NULL COMMENT '库位类型',
  `status` int(11) NULL DEFAULT NULL COMMENT '状态 1:正常 0:冻结',
  `deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除 1:是 0:否',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户',
  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '添加人员',
  `create_time` datetime NULL DEFAULT NULL COMMENT '添加时间',
  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '修改人员',
  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '设备表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of cv_devp
-- ----------------------------

-- ----------------------------
-- Table structure for cv_job
-- ----------------------------
DROP TABLE IF EXISTS `cv_job`;
CREATE TABLE `cv_job`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `task_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务号',
  `barcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '条形码',
  `batch_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次号',
  `sta_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站点号',
  `loc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '库位号',
  `job_no` int(11) NULL DEFAULT NULL COMMENT '工作号',
  `job_sts` int(11) NULL DEFAULT NULL COMMENT '工作状态',
  `start_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
  `wms_time` datetime NULL DEFAULT NULL COMMENT '入库时间',
  `rcs_time` datetime NULL DEFAULT NULL COMMENT '任务发生时间',
  `status` int(11) NULL DEFAULT NULL COMMENT '状态 1:正常 0:冻结',
  `deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除 1:是 0:否',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户',
  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '添加人员',
  `create_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '添加时间',
  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '修改人员',
  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of cv_job
-- ----------------------------

-- ----------------------------
-- Table structure for cv_job_log
-- ----------------------------
DROP TABLE IF EXISTS `cv_job_log`;
CREATE TABLE `cv_job_log`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `task_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务号',
  `barcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '条形码',
  `batch_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次号',
  `sta_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站点号',
  `loc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '库位号',
  `job_no` int(11) NULL DEFAULT NULL COMMENT '工作号',
  `job_sts` int(11) NULL DEFAULT NULL COMMENT '工作状态',
  `start_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
  `wms_time` datetime NULL DEFAULT NULL COMMENT '入库时间',
  `rcs_time` datetime NULL DEFAULT NULL COMMENT '任务发生时间',
  `status` int(11) NULL DEFAULT NULL COMMENT '状态 1:正常 0:冻结',
  `deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除 1:是 0:否',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户',
  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '添加人员',
  `create_time` datetime NULL DEFAULT NULL COMMENT '添加时间',
  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '修改人员',
  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务日志表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of cv_job_log
-- ----------------------------

-- ----------------------------
-- Table structure for cv_work_lastno
-- ----------------------------
DROP TABLE IF EXISTS `cv_work_lastno`;
CREATE TABLE `cv_work_lastno`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `type` int(11) NULL DEFAULT NULL COMMENT '类型',
  `wrk_no` int(11) NULL DEFAULT NULL COMMENT '当前工作号',
  `s_no` int(11) NULL DEFAULT NULL COMMENT '起始ID',
  `e_no` int(11) NULL DEFAULT NULL COMMENT '终止ID',
  `status` int(11) NULL DEFAULT NULL COMMENT '状态 1:正常 0:冻结',
  `deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除 1:是 0:否',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户',
  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '添加人员',
  `create_time` datetime NULL DEFAULT NULL COMMENT '添加时间',
  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '修改人员',
  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '工作号维护表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of cv_work_lastno
-- ----------------------------
INSERT INTO `cv_work_lastno` VALUES (1, 1, 1, 1, 8999, 1, 0, NULL, NULL, NULL, NULL, NULL, NULL);

SET FOREIGN_KEY_CHECKS = 1;
