
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_timer_record
-- ----------------------------
DROP TABLE IF EXISTS `t_timer_record`;
CREATE TABLE `t_timer_record`  (
  `id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  `reference_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '关联业务ID',
  `timer_status` smallint(0) NOT NULL DEFAULT 0 COMMENT '计时器状态: 0-停止 1-运行中 2-暂停',
  `accumulated_time` bigint(0) NOT NULL DEFAULT 0 COMMENT '累计计时时间(毫秒)',
  `current_start_time` datetime(0) NULL DEFAULT NULL COMMENT '当前开始时间',
  `last_pause_time` datetime(0) NULL DEFAULT NULL COMMENT '上次暂停时间',
  `created_user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人ID',
  `created_user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称',
  `created_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人ID',
  `update_user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人名称',
  `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uk_reference_id`(`reference_id`) USING BTREE COMMENT '关联业务ID唯一索引'
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '计时器记录表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;