create table test_tree
(
    id          bigint                       not null comment '主键'
        primary key,
    tenant_id   varchar(20) default '000000' null comment '租户编号',
    parent_id   bigint      default 0        null comment '父id',
    dept_id     bigint                       null comment '部门id',
    user_id     bigint                       null comment '用户id',
    tree_name   varchar(255)                 null comment '值',
    version     int         default 0        null comment '版本',
    create_dept bigint                       null comment '创建部门',
    create_time datetime                     null comment '创建时间',
    create_by   bigint                       null comment '创建人',
    update_time datetime                     null comment '更新时间',
    update_by   bigint                       null comment '更新人',
    del_flag    int         default 0        null comment '删除标志'
)
    comment '测试树表';

INSERT INTO ruoyi.test_tree (id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (1, '000000', 0, 102, 4, '测试数据权限', 0, 103, '2025-08-23 21:51:27', 1, null, null, 0);
INSERT INTO ruoyi.test_tree (id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (2, '000000', 1, 102, 3, '子节点1', 0, 103, '2025-08-23 21:51:27', 1, null, null, 0);
INSERT INTO ruoyi.test_tree (id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (3, '000000', 2, 102, 3, '子节点2', 0, 103, '2025-08-23 21:51:27', 1, null, null, 0);
INSERT INTO ruoyi.test_tree (id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (4, '000000', 0, 108, 4, '测试树1', 0, 103, '2025-08-23 21:51:27', 1, null, null, 0);
INSERT INTO ruoyi.test_tree (id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (5, '000000', 4, 108, 3, '子节点11', 0, 103, '2025-08-23 21:51:27', 1, null, null, 0);
INSERT INTO ruoyi.test_tree (id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (6, '000000', 4, 108, 3, '子节点22', 0, 103, '2025-08-23 21:51:27', 1, null, null, 0);
INSERT INTO ruoyi.test_tree (id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (7, '000000', 4, 108, 3, '子节点33', 0, 103, '2025-08-23 21:51:27', 1, null, null, 0);
INSERT INTO ruoyi.test_tree (id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (8, '000000', 5, 108, 3, '子节点44', 0, 103, '2025-08-23 21:51:27', 1, null, null, 0);
INSERT INTO ruoyi.test_tree (id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (9, '000000', 6, 108, 3, '子节点55', 0, 103, '2025-08-23 21:51:27', 1, null, null, 0);
INSERT INTO ruoyi.test_tree (id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (10, '000000', 7, 108, 3, '子节点66', 0, 103, '2025-08-23 21:51:27', 1, null, null, 0);
INSERT INTO ruoyi.test_tree (id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (11, '000000', 7, 108, 3, '子节点77', 0, 103, '2025-08-23 21:51:27', 1, null, null, 0);
INSERT INTO ruoyi.test_tree (id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (12, '000000', 10, 108, 3, '子节点88', 0, 103, '2025-08-23 21:51:27', 1, null, null, 0);
INSERT INTO ruoyi.test_tree (id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (13, '000000', 10, 108, 3, '子节点99', 0, 103, '2025-08-23 21:51:27', 1, null, null, 0);
