

ALTER TABLE xjr_oa_news ADD COLUMN `wf_status` int not null default 0 COMMENT '状态（1:结束 0:未结束）' AFTER send_range;

DROP TABLE IF EXISTS `wf_head_teacher_leave`;
CREATE TABLE `wf_head_teacher_leave` (
     `id` bigint NOT NULL COMMENT '主键编号',
     `create_user_id` bigint DEFAULT NULL COMMENT '创建人',
     `create_date` datetime DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` bigint DEFAULT NULL COMMENT '修改人',
     `modify_date` datetime DEFAULT NULL COMMENT '修改时间',
     `delete_mark` int NOT NULL COMMENT '删除标记',
     `enabled_mark` int NOT NULL COMMENT '有效标志',
     `sort_code` int DEFAULT NULL COMMENT '序号',
     `wf_teacherleave_id` bigint DEFAULT NULL COMMENT '教职工请假编号',
     `applicant_user_id` bigint DEFAULT NULL COMMENT '申请人',
     `leave_reason` varchar(20) DEFAULT NULL COMMENT '请假原因(xjr_dictionary_item[leave_reason])',
     `start_time` date DEFAULT NULL COMMENT '请假日期',
     `time_period` int DEFAULT NULL COMMENT '请假时间段 1=上午 2=下午',
     `is_substitute` int NOT NULL DEFAULT '0' COMMENT '是否有替班教师（1:是 0:否）',
     `substitute_user_id` bigint DEFAULT NULL COMMENT '替换教师',
     `remark` varchar(1000) DEFAULT NULL COMMENT '备注',
     `status` int NOT NULL DEFAULT '0' COMMENT '状态（1:结束 0:未结束）',
     PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='班主任事项请假';

DROP TABLE IF EXISTS `xjr_oa_news_relation`;
CREATE TABLE `xjr_oa_news_relation` (
    `id` varchar(64) NOT NULL,
    `news_id` bigint DEFAULT NULL,
    `user_id` bigint DEFAULT NULL,
    `create_date` datetime DEFAULT NULL,
    `read_mark` int DEFAULT NULL COMMENT '阅读标记  0=未读 2=已读',
    `read_date` datetime DEFAULT NULL COMMENT '阅读时间',
    `reply_content` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '回复内容',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;