create table flow_category
(
    category_id   bigint                        not null comment '流程分类ID'
        primary key,
    tenant_id     varchar(20)  default '000000' null comment '租户编号',
    parent_id     bigint       default 0        null comment '父流程分类id',
    ancestors     varchar(500) default ''       null comment '祖级列表',
    category_name varchar(30)                   not null comment '流程分类名称',
    order_num     int          default 0        null comment '显示顺序',
    del_flag      char         default '0'      null comment '删除标志（0代表存在 1代表删除）',
    create_dept   bigint                        null comment '创建部门',
    create_by     bigint                        null comment '创建者',
    create_time   datetime                      null comment '创建时间',
    update_by     bigint                        null comment '更新者',
    update_time   datetime                      null comment '更新时间'
)
    comment '流程分类';

INSERT INTO ruoyi.flow_category (category_id, tenant_id, parent_id, ancestors, category_name, order_num, del_flag, create_dept, create_by, create_time, update_by, update_time) VALUES (100, '000000', 0, '0', 'OA审批', 0, '0', 103, 1, '2025-08-23 21:52:12', null, null);
INSERT INTO ruoyi.flow_category (category_id, tenant_id, parent_id, ancestors, category_name, order_num, del_flag, create_dept, create_by, create_time, update_by, update_time) VALUES (101, '000000', 100, '0,100', '假勤管理', 0, '0', 103, 1, '2025-08-23 21:52:12', null, null);
INSERT INTO ruoyi.flow_category (category_id, tenant_id, parent_id, ancestors, category_name, order_num, del_flag, create_dept, create_by, create_time, update_by, update_time) VALUES (102, '000000', 100, '0,100', '人事管理', 1, '0', 103, 1, '2025-08-23 21:52:12', null, null);
INSERT INTO ruoyi.flow_category (category_id, tenant_id, parent_id, ancestors, category_name, order_num, del_flag, create_dept, create_by, create_time, update_by, update_time) VALUES (103, '000000', 101, '0,100,101', '请假', 0, '0', 103, 1, '2025-08-23 21:52:12', null, null);
INSERT INTO ruoyi.flow_category (category_id, tenant_id, parent_id, ancestors, category_name, order_num, del_flag, create_dept, create_by, create_time, update_by, update_time) VALUES (104, '000000', 101, '0,100,101', '出差', 1, '0', 103, 1, '2025-08-23 21:52:12', null, null);
INSERT INTO ruoyi.flow_category (category_id, tenant_id, parent_id, ancestors, category_name, order_num, del_flag, create_dept, create_by, create_time, update_by, update_time) VALUES (105, '000000', 101, '0,100,101', '加班', 2, '0', 103, 1, '2025-08-23 21:52:12', null, null);
INSERT INTO ruoyi.flow_category (category_id, tenant_id, parent_id, ancestors, category_name, order_num, del_flag, create_dept, create_by, create_time, update_by, update_time) VALUES (106, '000000', 101, '0,100,101', '换班', 3, '0', 103, 1, '2025-08-23 21:52:12', null, null);
INSERT INTO ruoyi.flow_category (category_id, tenant_id, parent_id, ancestors, category_name, order_num, del_flag, create_dept, create_by, create_time, update_by, update_time) VALUES (107, '000000', 101, '0,100,101', '外出', 4, '0', 103, 1, '2025-08-23 21:52:12', null, null);
INSERT INTO ruoyi.flow_category (category_id, tenant_id, parent_id, ancestors, category_name, order_num, del_flag, create_dept, create_by, create_time, update_by, update_time) VALUES (108, '000000', 102, '0,100,102', '转正', 1, '0', 103, 1, '2025-08-23 21:52:12', null, null);
INSERT INTO ruoyi.flow_category (category_id, tenant_id, parent_id, ancestors, category_name, order_num, del_flag, create_dept, create_by, create_time, update_by, update_time) VALUES (109, '000000', 102, '0,100,102', '离职', 2, '0', 103, 1, '2025-08-23 21:52:12', null, null);
