DROP TABLE IF EXISTS `pro_task_report`; CREATE TABLE `pro_task_report` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增字段,唯一', `dispatch_detail_id` bigint(20) NOT NULL COMMENT '派工单任务明细id', `owner` bigint(20) NOT NULL COMMENT '负责人', `amount` int(11) NOT NULL DEFAULT '0' COMMENT '数量', `start_time` datetime NOT NULL COMMENT '开始时间', `end_time` datetime NOT NULL COMMENT '结束时间', `work_time` DECIMAL(20,2) not null comment '报工工时', `report_time` datetime NOT NULL COMMENT '报工时间', `has_report` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否已报工 0 默认否 1 是', `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态,1表示正常,2表示禁用', `creator` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updater` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '更新者', `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE, KEY `idx_dispatch_id` (`dispatch_detail_id`) USING BTREE ) ENGINE=InnoDB COMMENT='任务报工表';