/*
 Navicat Premium Data Transfer

 Source Server         : yufeng
 Source Server Type    : PostgreSQL
 Source Server Version : 160004 (160004)
 Source Host           : 223.108.157.174:61603
 Source Catalog        : dj_api
 Source Schema         : public

 Target Server Type    : PostgreSQL
 Target Server Version : 160004 (160004)
 File Encoding         : 65001

 Date: 16/04/2026 17:28:18
*/


-- ----------------------------
-- Table structure for schedule_job
-- ----------------------------
DROP TABLE IF EXISTS "public"."schedule_job";
CREATE TABLE "public"."schedule_job"
(
    "id"              int8 NOT NULL,
    "bean_name"       varchar(200) COLLATE "pg_catalog"."default",
    "params"          varchar(2000) COLLATE "pg_catalog"."default",
    "cron_expression" varchar(100) COLLATE "pg_catalog"."default",
    "status"          int4,
    "remark"          varchar(255) COLLATE "pg_catalog"."default",
    "creator"         int8,
    "create_date"     timestamp(6),
    "updater"         int8,
    "update_date"     timestamp(6)
)
;
COMMENT
ON COLUMN "public"."schedule_job"."id" IS 'id';
COMMENT
ON COLUMN "public"."schedule_job"."bean_name" IS 'spring bean名称';
COMMENT
ON COLUMN "public"."schedule_job"."params" IS '参数';
COMMENT
ON COLUMN "public"."schedule_job"."cron_expression" IS 'cron表达式';
COMMENT
ON COLUMN "public"."schedule_job"."status" IS '任务状态  0：暂停  1：正常';
COMMENT
ON COLUMN "public"."schedule_job"."remark" IS '备注';
COMMENT
ON COLUMN "public"."schedule_job"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."schedule_job"."create_date" IS '创建时间';
COMMENT
ON COLUMN "public"."schedule_job"."updater" IS '更新者';
COMMENT
ON COLUMN "public"."schedule_job"."update_date" IS '更新时间';
COMMENT
ON TABLE "public"."schedule_job" IS '定时任务';

-- ----------------------------
-- Table structure for schedule_job_log
-- ----------------------------
DROP TABLE IF EXISTS "public"."schedule_job_log";
CREATE TABLE "public"."schedule_job_log"
(
    "id"          int8 NOT NULL,
    "job_id"      int8 NOT NULL,
    "bean_name"   varchar(200) COLLATE "pg_catalog"."default",
    "params"      varchar(2000) COLLATE "pg_catalog"."default",
    "status"      int4,
    "error"       varchar(2000) COLLATE "pg_catalog"."default",
    "times"       int4,
    "create_date" timestamp(6)
)
;
COMMENT
ON COLUMN "public"."schedule_job_log"."id" IS 'id';
COMMENT
ON COLUMN "public"."schedule_job_log"."bean_name" IS 'spring bean名称';
COMMENT
ON COLUMN "public"."schedule_job_log"."params" IS '参数';
COMMENT
ON COLUMN "public"."schedule_job_log"."status" IS '任务状态  0：失败    1：成功';
COMMENT
ON COLUMN "public"."schedule_job_log"."error" IS '失败信息';
COMMENT
ON COLUMN "public"."schedule_job_log"."times" IS '耗时(单位：毫秒)';
COMMENT
ON TABLE "public"."schedule_job_log" IS '定时任务日志';

-- ----------------------------
-- Records of schedule_job_log
-- ----------------------------

-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_dept";
CREATE TABLE "public"."sys_dept"
(
    "id"          int8 NOT NULL,
    "pid"         int8,
    "pids"        varchar(500) COLLATE "pg_catalog"."default",
    "name"        varchar(50) COLLATE "pg_catalog"."default",
    "sort"        int4,
    "creator"     int8,
    "create_date" timestamp(6),
    "updater"     int8,
    "update_date" timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_dept"."id" IS 'id';
COMMENT
ON COLUMN "public"."sys_dept"."pid" IS '上级ID';
COMMENT
ON COLUMN "public"."sys_dept"."pids" IS '所有上级ID，用逗号分开';
COMMENT
ON COLUMN "public"."sys_dept"."name" IS '部门名称';
COMMENT
ON COLUMN "public"."sys_dept"."sort" IS '排序';
COMMENT
ON COLUMN "public"."sys_dept"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."sys_dept"."create_date" IS '创建时间';
COMMENT
ON COLUMN "public"."sys_dept"."updater" IS '更新者';
COMMENT
ON COLUMN "public"."sys_dept"."update_date" IS '更新时间';
COMMENT
ON TABLE "public"."sys_dept" IS '部门管理';

-- ----------------------------
-- Records of sys_dept
-- ----------------------------
INSERT INTO "public"."sys_dept"
VALUES (1067246875800000066, 0, '0', '一级部门', 0, 1067246875800000001, '2026-04-14 21:12:05.693419',
        1067246875800000001, '2026-04-14 21:12:05.693419');

-- ----------------------------
-- Table structure for sys_dict_data
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_dict_data";
CREATE TABLE "public"."sys_dict_data"
(
    "id"           int8 NOT NULL,
    "dict_type_id" int8 NOT NULL,
    "dict_label"   varchar(255) COLLATE "pg_catalog"."default",
    "dict_value"   varchar(255) COLLATE "pg_catalog"."default",
    "remark"       varchar(255) COLLATE "pg_catalog"."default",
    "sort"         int4,
    "creator"      int8,
    "create_date"  timestamp(6),
    "updater"      int8,
    "update_date"  timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_dict_data"."id" IS 'id';
COMMENT
ON COLUMN "public"."sys_dict_data"."dict_type_id" IS '字典类型ID';
COMMENT
ON COLUMN "public"."sys_dict_data"."dict_label" IS '字典标签';
COMMENT
ON COLUMN "public"."sys_dict_data"."dict_value" IS '字典值';
COMMENT
ON COLUMN "public"."sys_dict_data"."remark" IS '备注';
COMMENT
ON COLUMN "public"."sys_dict_data"."sort" IS '排序';
COMMENT
ON COLUMN "public"."sys_dict_data"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."sys_dict_data"."create_date" IS '创建时间';
COMMENT
ON COLUMN "public"."sys_dict_data"."updater" IS '更新者';
COMMENT
ON COLUMN "public"."sys_dict_data"."update_date" IS '更新时间';
COMMENT
ON TABLE "public"."sys_dict_data" IS '字典数据';

-- ----------------------------
-- Records of sys_dict_data
-- ----------------------------
INSERT INTO "public"."sys_dict_data"
VALUES (1160061112075464705, 1160061077912858625, '男', '0', '', 0, 1067246875800000001, '2026-04-14 21:12:05.723678',
        1067246875800000001, '2026-04-14 21:12:05.723678');
INSERT INTO "public"."sys_dict_data"
VALUES (1160061146967879681, 1160061077912858625, '女', '1', '', 1, 1067246875800000001, '2026-04-14 21:12:05.73165',
        1067246875800000001, '2026-04-14 21:12:05.73165');
INSERT INTO "public"."sys_dict_data"
VALUES (1160061190127267841, 1160061077912858625, '保密', '2', '', 2, 1067246875800000001, '2026-04-14 21:12:05.738683',
        1067246875800000001, '2026-04-14 21:12:05.738683');

-- ----------------------------
-- Table structure for sys_dict_type
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_dict_type";
CREATE TABLE "public"."sys_dict_type"
(
    "id"          int8 NOT NULL,
    "dict_type"   varchar(100) COLLATE "pg_catalog"."default",
    "dict_name"   varchar(255) COLLATE "pg_catalog"."default",
    "remark"      varchar(255) COLLATE "pg_catalog"."default",
    "sort"        int4,
    "creator"     int8,
    "create_date" timestamp(6),
    "updater"     int8,
    "update_date" timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_dict_type"."id" IS 'id';
COMMENT
ON COLUMN "public"."sys_dict_type"."dict_type" IS '字典类型';
COMMENT
ON COLUMN "public"."sys_dict_type"."dict_name" IS '字典名称';
COMMENT
ON COLUMN "public"."sys_dict_type"."remark" IS '备注';
COMMENT
ON COLUMN "public"."sys_dict_type"."sort" IS '排序';
COMMENT
ON COLUMN "public"."sys_dict_type"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."sys_dict_type"."create_date" IS '创建时间';
COMMENT
ON COLUMN "public"."sys_dict_type"."updater" IS '更新者';
COMMENT
ON COLUMN "public"."sys_dict_type"."update_date" IS '更新时间';
COMMENT
ON TABLE "public"."sys_dict_type" IS '字典类型';

-- ----------------------------
-- Records of sys_dict_type
-- ----------------------------
INSERT INTO "public"."sys_dict_type"
VALUES (1160061077912858625, 'gender', '性别', '', 0, 1067246875800000001, '2026-04-14 21:12:05.716179',
        1067246875800000001, '2026-04-14 21:12:05.716179');

-- ----------------------------
-- Table structure for sys_log_error
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_log_error";
CREATE TABLE "public"."sys_log_error"
(
    "id"             int8 NOT NULL,
    "request_uri"    varchar(200) COLLATE "pg_catalog"."default",
    "request_method" varchar(20) COLLATE "pg_catalog"."default",
    "request_params" text COLLATE "pg_catalog"."default",
    "user_agent"     varchar(500) COLLATE "pg_catalog"."default",
    "ip"             varchar(32) COLLATE "pg_catalog"."default",
    "error_info"     text COLLATE "pg_catalog"."default",
    "creator"        int8,
    "create_date"    timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_log_error"."id" IS 'id';
COMMENT
ON COLUMN "public"."sys_log_error"."request_uri" IS '请求URI';
COMMENT
ON COLUMN "public"."sys_log_error"."request_method" IS '请求方式';
COMMENT
ON COLUMN "public"."sys_log_error"."request_params" IS '请求参数';
COMMENT
ON COLUMN "public"."sys_log_error"."user_agent" IS '用户代理';
COMMENT
ON COLUMN "public"."sys_log_error"."ip" IS '操作IP';
COMMENT
ON COLUMN "public"."sys_log_error"."error_info" IS '异常信息';
COMMENT
ON COLUMN "public"."sys_log_error"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."sys_log_error"."create_date" IS '创建时间';
COMMENT
ON TABLE "public"."sys_log_error" IS '异常日志';

-- ----------------------------
-- Table structure for sys_log_login
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_log_login";
CREATE TABLE "public"."sys_log_login"
(
    "id"           int8 NOT NULL,
    "operation"    int4,
    "status"       int4,
    "user_agent"   varchar(500) COLLATE "pg_catalog"."default",
    "ip"           varchar(32) COLLATE "pg_catalog"."default",
    "creator_name" varchar(50) COLLATE "pg_catalog"."default",
    "creator"      int8,
    "create_date"  timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_log_login"."id" IS 'id';
COMMENT
ON COLUMN "public"."sys_log_login"."operation" IS '用户操作   0：用户登录   1：用户退出';
COMMENT
ON COLUMN "public"."sys_log_login"."status" IS '状态  0：失败    1：成功    2：账号已锁定';
COMMENT
ON COLUMN "public"."sys_log_login"."user_agent" IS '用户代理';
COMMENT
ON COLUMN "public"."sys_log_login"."ip" IS '操作IP';
COMMENT
ON COLUMN "public"."sys_log_login"."creator_name" IS '用户名';
COMMENT
ON COLUMN "public"."sys_log_login"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."sys_log_login"."create_date" IS '创建时间';
COMMENT
ON TABLE "public"."sys_log_login" IS '登录日志';

-- ----------------------------
-- Records of sys_log_login
-- ----------------------------

-- ----------------------------
-- Table structure for sys_log_operation
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_log_operation";
CREATE TABLE "public"."sys_log_operation"
(
    "id"             int8 NOT NULL,
    "operation"      varchar(50) COLLATE "pg_catalog"."default",
    "request_uri"    varchar(200) COLLATE "pg_catalog"."default",
    "request_method" varchar(20) COLLATE "pg_catalog"."default",
    "request_params" text COLLATE "pg_catalog"."default",
    "request_time"   int4,
    "user_agent"     varchar(500) COLLATE "pg_catalog"."default",
    "ip"             varchar(32) COLLATE "pg_catalog"."default",
    "status"         int4,
    "creator_name"   varchar(50) COLLATE "pg_catalog"."default",
    "creator"        int8,
    "create_date"    timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_log_operation"."id" IS 'id';
COMMENT
ON COLUMN "public"."sys_log_operation"."operation" IS '用户操作';
COMMENT
ON COLUMN "public"."sys_log_operation"."request_uri" IS '请求URI';
COMMENT
ON COLUMN "public"."sys_log_operation"."request_method" IS '请求方式';
COMMENT
ON COLUMN "public"."sys_log_operation"."request_params" IS '请求参数';
COMMENT
ON COLUMN "public"."sys_log_operation"."request_time" IS '请求时长(毫秒)';
COMMENT
ON COLUMN "public"."sys_log_operation"."user_agent" IS '用户代理';
COMMENT
ON COLUMN "public"."sys_log_operation"."ip" IS '操作IP';
COMMENT
ON COLUMN "public"."sys_log_operation"."status" IS '状态  0：失败   1：成功';
COMMENT
ON COLUMN "public"."sys_log_operation"."creator_name" IS '用户名';
COMMENT
ON COLUMN "public"."sys_log_operation"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."sys_log_operation"."create_date" IS '创建时间';
COMMENT
ON TABLE "public"."sys_log_operation" IS '操作日志';

-- ----------------------------
-- Records of sys_log_operation
-- ----------------------------

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_menu";
CREATE TABLE "public"."sys_menu"
(
    "id"          int8 NOT NULL,
    "pid"         int8,
    "name"        varchar(200) COLLATE "pg_catalog"."default",
    "url"         varchar(200) COLLATE "pg_catalog"."default",
    "permissions" varchar(500) COLLATE "pg_catalog"."default",
    "menu_type"   int4,
    "icon"        varchar(50) COLLATE "pg_catalog"."default",
    "sort"        int4,
    "creator"     int8,
    "create_date" timestamp(6),
    "updater"     int8,
    "update_date" timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_menu"."id" IS 'id';
COMMENT
ON COLUMN "public"."sys_menu"."pid" IS '上级ID，一级菜单为0';
COMMENT
ON COLUMN "public"."sys_menu"."name" IS '名称';
COMMENT
ON COLUMN "public"."sys_menu"."url" IS '菜单URL';
COMMENT
ON COLUMN "public"."sys_menu"."permissions" IS '授权(多个用逗号分隔，如：sys:user:list,sys:user:save)';
COMMENT
ON COLUMN "public"."sys_menu"."menu_type" IS '类型   0：菜单   1：按钮';
COMMENT
ON COLUMN "public"."sys_menu"."icon" IS '菜单图标';
COMMENT
ON COLUMN "public"."sys_menu"."sort" IS '排序';
COMMENT
ON COLUMN "public"."sys_menu"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."sys_menu"."create_date" IS '创建时间';
COMMENT
ON COLUMN "public"."sys_menu"."updater" IS '更新者';
COMMENT
ON COLUMN "public"."sys_menu"."update_date" IS '更新时间';
COMMENT
ON TABLE "public"."sys_menu" IS '菜单管理';

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000002, 0, '权限管理', NULL, NULL, 0, 'icon-safetycertificate', 0, 1067246875800000001,
        '2026-04-14 21:12:05.272081', 1067246875800000001, '2026-04-14 21:12:05.272081');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000003, 1067246875800000055, '新增', NULL, 'sys:user:save,sys:dept:list,sys:role:list', 1, NULL, 1,
        1067246875800000001, '2026-04-14 21:12:05.280416', 1067246875800000001, '2026-04-14 21:12:05.280416');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000004, 1067246875800000055, '修改', NULL, 'sys:user:update,sys:dept:list,sys:role:list', 1, NULL,
        2, 1067246875800000001, '2026-04-14 21:12:05.288126', 1067246875800000001, '2026-04-14 21:12:05.288126');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000005, 1067246875800000055, '删除', NULL, 'sys:user:delete', 1, NULL, 3, 1067246875800000001,
        '2026-04-14 21:12:05.295657', 1067246875800000001, '2026-04-14 21:12:05.295657');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000006, 1067246875800000055, '导出', NULL, 'sys:user:export', 1, NULL, 4, 1067246875800000001,
        '2026-04-14 21:12:05.302674', 1067246875800000001, '2026-04-14 21:12:05.302674');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000007, 1067246875800000002, '角色管理', 'sys/role', NULL, 0, 'icon-team', 2, 1067246875800000001,
        '2026-04-14 21:12:05.310628', 1067246875800000001, '2026-04-14 21:12:05.310628');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000008, 1067246875800000007, '查看', NULL, 'sys:role:page,sys:role:info', 1, NULL, 0,
        1067246875800000001, '2026-04-14 21:12:05.319374', 1067246875800000001, '2026-04-14 21:12:05.319374');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000009, 1067246875800000007, '新增', NULL, 'sys:role:save,sys:menu:select,sys:dept:list', 1, NULL,
        1, 1067246875800000001, '2026-04-14 21:12:05.326615', 1067246875800000001, '2026-04-14 21:12:05.326615');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000010, 1067246875800000007, '修改', NULL, 'sys:role:update,sys:menu:select,sys:dept:list', 1,
        NULL, 2, 1067246875800000001, '2026-04-14 21:12:05.333601', 1067246875800000001, '2026-04-14 21:12:05.333601');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000011, 1067246875800000007, '删除', NULL, 'sys:role:delete', 1, NULL, 3, 1067246875800000001,
        '2026-04-14 21:12:05.342612', 1067246875800000001, '2026-04-14 21:12:05.342612');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000012, 1067246875800000002, '部门管理', 'sys/dept', NULL, 0, 'icon-apartment', 1,
        1067246875800000001, '2026-04-14 21:12:05.349646', 1067246875800000001, '2026-04-14 21:12:05.349646');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000014, 1067246875800000012, '查看', NULL, 'sys:dept:list,sys:dept:info', 1, NULL, 0,
        1067246875800000001, '2026-04-14 21:12:05.357621', 1067246875800000001, '2026-04-14 21:12:05.357621');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000015, 1067246875800000012, '新增', NULL, 'sys:dept:save', 1, NULL, 1, 1067246875800000001,
        '2026-04-14 21:12:05.365139', 1067246875800000001, '2026-04-14 21:12:05.365139');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000016, 1067246875800000012, '修改', NULL, 'sys:dept:update', 1, NULL, 2, 1067246875800000001,
        '2026-04-14 21:12:05.373446', 1067246875800000001, '2026-04-14 21:12:05.373446');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000017, 1067246875800000012, '删除', NULL, 'sys:dept:delete', 1, NULL, 3, 1067246875800000001,
        '2026-04-14 21:12:05.380647', 1067246875800000001, '2026-04-14 21:12:05.380647');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000025, 1067246875800000035, '菜单管理', 'sys/menu', NULL, 0, 'icon-unorderedlist', 0,
        1067246875800000001, '2026-04-14 21:12:05.388875', 1067246875800000001, '2026-04-14 21:12:05.388875');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000026, 1067246875800000025, '查看', NULL, 'sys:menu:list,sys:menu:info', 1, NULL, 0,
        1067246875800000001, '2026-04-14 21:12:05.396854', 1067246875800000001, '2026-04-14 21:12:05.396854');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000027, 1067246875800000025, '新增', NULL, 'sys:menu:save', 1, NULL, 1, 1067246875800000001,
        '2026-04-14 21:12:05.404892', 1067246875800000001, '2026-04-14 21:12:05.404892');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000028, 1067246875800000025, '修改', NULL, 'sys:menu:update', 1, NULL, 2, 1067246875800000001,
        '2026-04-14 21:12:05.412172', 1067246875800000001, '2026-04-14 21:12:05.412172');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000029, 1067246875800000025, '删除', NULL, 'sys:menu:delete', 1, NULL, 3, 1067246875800000001,
        '2026-04-14 21:12:05.422874', 1067246875800000001, '2026-04-14 21:12:05.422874');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000030, 1067246875800000035, '定时任务', 'job/schedule', NULL, 0, 'icon-dashboard', 3,
        1067246875800000001, '2026-04-14 21:12:05.432687', 1067246875800000001, '2026-04-14 21:12:05.432687');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000031, 1067246875800000030, '查看', NULL, 'sys:schedule:page,sys:schedule:info', 1, NULL, 0,
        1067246875800000001, '2026-04-14 21:12:05.440457', 1067246875800000001, '2026-04-14 21:12:05.440457');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000032, 1067246875800000030, '新增', NULL, 'sys:schedule:save', 1, NULL, 1, 1067246875800000001,
        '2026-04-14 21:12:05.447912', 1067246875800000001, '2026-04-14 21:12:05.447912');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000033, 1067246875800000030, '修改', NULL, 'sys:schedule:update', 1, NULL, 2, 1067246875800000001,
        '2026-04-14 21:12:05.455087', 1067246875800000001, '2026-04-14 21:12:05.455087');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000034, 1067246875800000030, '删除', NULL, 'sys:schedule:delete', 1, NULL, 3, 1067246875800000001,
        '2026-04-14 21:12:05.462176', 1067246875800000001, '2026-04-14 21:12:05.462176');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000035, 0, '系统设置', NULL, NULL, 0, 'icon-setting', 1, 1067246875800000001,
        '2026-04-14 21:12:05.469205', 1067246875800000001, '2026-04-14 21:12:05.469205');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000036, 1067246875800000030, '暂停', NULL, 'sys:schedule:pause', 1, NULL, 4, 1067246875800000001,
        '2026-04-14 21:12:05.475637', 1067246875800000001, '2026-04-14 21:12:05.475637');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000037, 1067246875800000030, '恢复', NULL, 'sys:schedule:resume', 1, NULL, 5, 1067246875800000001,
        '2026-04-14 21:12:05.482679', 1067246875800000001, '2026-04-14 21:12:05.482679');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000038, 1067246875800000030, '立即执行', NULL, 'sys:schedule:run', 1, NULL, 6, 1067246875800000001,
        '2026-04-14 21:12:05.490697', 1067246875800000001, '2026-04-14 21:12:05.490697');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000039, 1067246875800000030, '日志列表', NULL, 'sys:schedule:log', 1, NULL, 7, 1067246875800000001,
        '2026-04-14 21:12:05.498181', 1067246875800000001, '2026-04-14 21:12:05.498181');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000040, 1067246875800000035, '参数管理', 'sys/params', '', 0, 'icon-fileprotect', 1,
        1067246875800000001, '2026-04-14 21:12:05.505152', 1067246875800000001, '2026-04-14 21:12:05.505152');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000041, 1067246875800000035, '字典管理', 'sys/dict-type', NULL, 0, 'icon-golden-fill', 2,
        1067246875800000001, '2026-04-14 21:12:05.512428', 1067246875800000001, '2026-04-14 21:12:05.512428');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000042, 1067246875800000041, '查看', NULL, 'sys:dict:page,sys:dict:info', 1, NULL, 0,
        1067246875800000001, '2026-04-14 21:12:05.519687', 1067246875800000001, '2026-04-14 21:12:05.519687');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000043, 1067246875800000041, '新增', NULL, 'sys:dict:save', 1, NULL, 1, 1067246875800000001,
        '2026-04-14 21:12:05.52668', 1067246875800000001, '2026-04-14 21:12:05.52668');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000044, 1067246875800000041, '修改', NULL, 'sys:dict:update', 1, NULL, 2, 1067246875800000001,
        '2026-04-14 21:12:05.534441', 1067246875800000001, '2026-04-14 21:12:05.534441');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000045, 1067246875800000041, '删除', NULL, 'sys:dict:delete', 1, NULL, 3, 1067246875800000001,
        '2026-04-14 21:12:05.542675', 1067246875800000001, '2026-04-14 21:12:05.542675');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000046, 0, '日志管理', NULL, NULL, 0, 'icon-container', 2, 1067246875800000001,
        '2026-04-14 21:12:05.551193', 1067246875800000001, '2026-04-14 21:12:05.551193');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000047, 1067246875800000035, '文件上传', 'oss/oss', 'sys:oss:all', 0, 'icon-upload', 4,
        1067246875800000001, '2026-04-14 21:12:05.559432', 1067246875800000001, '2026-04-14 21:12:05.559432');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000048, 1067246875800000046, '登录日志', 'sys/log-login', 'sys:log:login', 0, 'icon-filedone', 0,
        1067246875800000001, '2026-04-14 21:12:05.566938', 1067246875800000001, '2026-04-14 21:12:05.566938');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000049, 1067246875800000046, '操作日志', 'sys/log-operation', 'sys:log:operation', 0,
        'icon-solution', 1, 1067246875800000001, '2026-04-14 21:12:05.574425', 1067246875800000001,
        '2026-04-14 21:12:05.574425');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000050, 1067246875800000046, '异常日志', 'sys/log-error', 'sys:log:error', 0,
        'icon-file-exception', 2, 1067246875800000001, '2026-04-14 21:12:05.58244', 1067246875800000001,
        '2026-04-14 21:12:05.58244');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000051, 1067246875800000053, 'SQL监控', '{{ApiUrl}}/druid/sql.html', NULL, 0, 'icon-database', 0,
        1067246875800000001, '2026-04-14 21:12:05.58992', 1067246875800000001, '2026-04-14 21:12:05.58992');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000053, 0, '系统监控', NULL, NULL, 0, 'icon-desktop', 3, 1067246875800000001,
        '2026-04-14 21:12:05.597203', 1067246875800000001, '2026-04-14 21:12:05.597203');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000055, 1067246875800000002, '用户管理', 'sys/user', NULL, 0, 'icon-user', 0, 1067246875800000001,
        '2026-04-14 21:12:05.604432', 1067246875800000001, '2026-04-14 21:12:05.604432');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000056, 1067246875800000055, '查看', NULL, 'sys:user:page,sys:user:info', 1, NULL, 0,
        1067246875800000001, '2026-04-14 21:12:05.611445', 1067246875800000001, '2026-04-14 21:12:05.611445');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000057, 1067246875800000040, '新增', NULL, 'sys:params:save', 1, NULL, 1, 1067246875800000001,
        '2026-04-14 21:12:05.618653', 1067246875800000001, '2026-04-14 21:12:05.618653');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000058, 1067246875800000040, '导出', NULL, 'sys:params:export', 1, NULL, 4, 1067246875800000001,
        '2026-04-14 21:12:05.627428', 1067246875800000001, '2026-04-14 21:12:05.627428');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000059, 1067246875800000040, '查看', '', 'sys:params:page,sys:params:info', 1, NULL, 0,
        1067246875800000001, '2026-04-14 21:12:05.63518', 1067246875800000001, '2026-04-14 21:12:05.63518');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000060, 1067246875800000040, '修改', NULL, 'sys:params:update', 1, NULL, 2, 1067246875800000001,
        '2026-04-14 21:12:05.64219', 1067246875800000001, '2026-04-14 21:12:05.64219');
INSERT INTO "public"."sys_menu"
VALUES (1067246875800000061, 1067246875800000040, '删除', '', 'sys:params:delete', 1, '', 3, 1067246875800000001,
        '2026-04-14 21:12:05.649438', 1067246875800000001, '2026-04-14 21:12:05.649438');
INSERT INTO "public"."sys_menu"
VALUES (1156748733921165314, 1067246875800000053, '接口文档', '{{ApiUrl}}/doc.html', '', 0, 'icon-file-word', 1,
        1067246875800000001, '2026-04-14 21:12:05.656176', 1067246875800000001, '2026-04-14 21:12:05.656176');

-- ----------------------------
-- Table structure for sys_params
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_params";
CREATE TABLE "public"."sys_params"
(
    "id"          int8 NOT NULL,
    "param_code"  varchar(32) COLLATE "pg_catalog"."default",
    "param_value" varchar(2000) COLLATE "pg_catalog"."default",
    "param_type"  int4 NOT NULL DEFAULT 1,
    "remark"      varchar(200) COLLATE "pg_catalog"."default",
    "creator"     int8,
    "create_date" timestamp(6),
    "updater"     int8,
    "update_date" timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_params"."param_code" IS '参数编码';
COMMENT
ON COLUMN "public"."sys_params"."param_value" IS '参数值';
COMMENT
ON COLUMN "public"."sys_params"."param_type" IS '类型   0：系统参数   1：非系统参数';
COMMENT
ON COLUMN "public"."sys_params"."remark" IS '备注';
COMMENT
ON COLUMN "public"."sys_params"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."sys_params"."create_date" IS '创建时间';
COMMENT
ON COLUMN "public"."sys_params"."updater" IS '更新者';
COMMENT
ON COLUMN "public"."sys_params"."update_date" IS '更新时间';
COMMENT
ON TABLE "public"."sys_params" IS '参数管理';

-- ----------------------------
-- Records of sys_params
-- ----------------------------

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_role";
CREATE TABLE "public"."sys_role"
(
    "id"          int8 NOT NULL,
    "name"        varchar(50) COLLATE "pg_catalog"."default",
    "remark"      varchar(100) COLLATE "pg_catalog"."default",
    "dept_id"     int8,
    "creator"     int8,
    "create_date" timestamp(6),
    "updater"     int8,
    "update_date" timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_role"."id" IS 'id';
COMMENT
ON COLUMN "public"."sys_role"."name" IS '角色名称';
COMMENT
ON COLUMN "public"."sys_role"."remark" IS '备注';
COMMENT
ON COLUMN "public"."sys_role"."dept_id" IS '部门ID';
COMMENT
ON COLUMN "public"."sys_role"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."sys_role"."create_date" IS '创建时间';
COMMENT
ON COLUMN "public"."sys_role"."updater" IS '更新者';
COMMENT
ON COLUMN "public"."sys_role"."update_date" IS '更新时间';
COMMENT
ON TABLE "public"."sys_role" IS '角色管理';

-- ----------------------------
-- Records of sys_role
-- ----------------------------

-- ----------------------------
-- Table structure for sys_role_data_scope
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_role_data_scope";
CREATE TABLE "public"."sys_role_data_scope"
(
    "id"          int8 NOT NULL,
    "role_id"     int8,
    "dept_id"     int8,
    "creator"     int8,
    "create_date" timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_role_data_scope"."role_id" IS '角色ID';
COMMENT
ON COLUMN "public"."sys_role_data_scope"."dept_id" IS '部门ID';
COMMENT
ON COLUMN "public"."sys_role_data_scope"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."sys_role_data_scope"."create_date" IS '创建时间';
COMMENT
ON TABLE "public"."sys_role_data_scope" IS '角色数据权限';

-- ----------------------------
-- Records of sys_role_data_scope
-- ----------------------------

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_role_menu";
CREATE TABLE "public"."sys_role_menu"
(
    "id"          int8 NOT NULL,
    "role_id"     int8,
    "menu_id"     int8,
    "creator"     int8,
    "create_date" timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_role_menu"."role_id" IS '角色ID';
COMMENT
ON COLUMN "public"."sys_role_menu"."menu_id" IS '菜单ID';
COMMENT
ON COLUMN "public"."sys_role_menu"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."sys_role_menu"."create_date" IS '创建时间';
COMMENT
ON TABLE "public"."sys_role_menu" IS '角色菜单关系';

-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------

-- ----------------------------
-- Table structure for sys_role_user
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_role_user";
CREATE TABLE "public"."sys_role_user"
(
    "id"          int8 NOT NULL,
    "role_id"     int8,
    "user_id"     int8,
    "creator"     int8,
    "create_date" timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_role_user"."role_id" IS '角色ID';
COMMENT
ON COLUMN "public"."sys_role_user"."user_id" IS '用户ID';
COMMENT
ON COLUMN "public"."sys_role_user"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."sys_role_user"."create_date" IS '创建时间';
COMMENT
ON TABLE "public"."sys_role_user" IS '角色用户关系';

-- ----------------------------
-- Records of sys_role_user
-- ----------------------------

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_user";
CREATE TABLE "public"."sys_user"
(
    "id"          int8                                       NOT NULL,
    "username"    varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
    "password"    varchar(100) COLLATE "pg_catalog"."default",
    "real_name"   varchar(50) COLLATE "pg_catalog"."default",
    "head_url"    varchar(200) COLLATE "pg_catalog"."default",
    "gender"      int4,
    "email"       varchar(100) COLLATE "pg_catalog"."default",
    "mobile"      varchar(100) COLLATE "pg_catalog"."default",
    "dept_id"     int8,
    "super_admin" int4,
    "status"      int4,
    "creator"     int8,
    "create_date" timestamp(6),
    "updater"     int8,
    "update_date" timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_user"."id" IS 'id';
COMMENT
ON COLUMN "public"."sys_user"."username" IS '用户名';
COMMENT
ON COLUMN "public"."sys_user"."password" IS '密码';
COMMENT
ON COLUMN "public"."sys_user"."real_name" IS '姓名';
COMMENT
ON COLUMN "public"."sys_user"."head_url" IS '头像';
COMMENT
ON COLUMN "public"."sys_user"."gender" IS '性别   0：男   1：女    2：保密';
COMMENT
ON COLUMN "public"."sys_user"."email" IS '邮箱';
COMMENT
ON COLUMN "public"."sys_user"."mobile" IS '手机号';
COMMENT
ON COLUMN "public"."sys_user"."dept_id" IS '部门ID';
COMMENT
ON COLUMN "public"."sys_user"."super_admin" IS '超级管理员   0：否   1：是';
COMMENT
ON COLUMN "public"."sys_user"."status" IS '状态  0：停用    1：正常';
COMMENT
ON COLUMN "public"."sys_user"."creator" IS '创建者';
COMMENT
ON COLUMN "public"."sys_user"."create_date" IS '创建时间';
COMMENT
ON COLUMN "public"."sys_user"."updater" IS '更新者';
COMMENT
ON COLUMN "public"."sys_user"."update_date" IS '更新时间';
COMMENT
ON TABLE "public"."sys_user" IS '用户管理';

-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO "public"."sys_user"
VALUES (1067246875800000001, 'admin', '$2a$10$012Kx2ba5jzqr9gLlG4MX.bnQJTD9UWqF57XDo2N3.fPtLne02u/m', '管理员', NULL, 0,
        NULL, NULL, NULL, 1, 1, 1067246875800000001, '2026-04-14 21:12:05.264391', 1067246875800000001,
        '2026-04-14 21:12:05.264391');

-- ----------------------------
-- Table structure for sys_user_token
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_user_token";
CREATE TABLE "public"."sys_user_token"
(
    "id"          int8 NOT NULL,
    "user_id"     int8,
    "token"       varchar(100) COLLATE "pg_catalog"."default",
    "expire_date" timestamp(6),
    "update_date" timestamp(6),
    "create_date" timestamp(6)
)
;
COMMENT
ON COLUMN "public"."sys_user_token"."id" IS 'id';
COMMENT
ON COLUMN "public"."sys_user_token"."user_id" IS '用户id';
COMMENT
ON COLUMN "public"."sys_user_token"."token" IS '用户token';
COMMENT
ON COLUMN "public"."sys_user_token"."expire_date" IS '过期时间';
COMMENT
ON COLUMN "public"."sys_user_token"."update_date" IS '更新时间';
COMMENT
ON COLUMN "public"."sys_user_token"."create_date" IS '创建时间';
COMMENT
ON TABLE "public"."sys_user_token" IS '系统用户Token';

-- ----------------------------
-- Records of sys_user_token
-- ----------------------------
INSERT INTO "public"."sys_user_token"
VALUES (1067246875800000001, 1067246875800000001, '1067246875800000001', '2026-12-01 00:00:00', NULL, NULL);

-- ----------------------------
-- Indexes structure for table schedule_job
-- ----------------------------
CREATE INDEX "idx_schedule_job_create_date" ON "public"."schedule_job" USING btree (
    "create_date" "pg_catalog"."timestamp_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table schedule_job
-- ----------------------------
ALTER TABLE "public"."schedule_job"
    ADD CONSTRAINT "schedule_job_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table schedule_job_log
-- ----------------------------
CREATE INDEX "idx_job_log_create_date" ON "public"."schedule_job_log" USING btree (
    "create_date" "pg_catalog"."timestamp_ops" ASC NULLS LAST
    );
CREATE INDEX "idx_job_log_job_id" ON "public"."schedule_job_log" USING btree (
    "job_id" "pg_catalog"."int8_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table schedule_job_log
-- ----------------------------
ALTER TABLE "public"."schedule_job_log"
    ADD CONSTRAINT "schedule_job_log_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_dept
-- ----------------------------
CREATE INDEX "idx_sys_dept_idx_sort" ON "public"."sys_dept" USING btree (
    "sort" "pg_catalog"."int4_ops" ASC NULLS LAST
    );
CREATE INDEX "idx_sys_dept_pid" ON "public"."sys_dept" USING btree (
    "pid" "pg_catalog"."int8_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_dept
-- ----------------------------
ALTER TABLE "public"."sys_dept"
    ADD CONSTRAINT "sys_dept_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_dict_data
-- ----------------------------
CREATE INDEX "idx_sys_dict_data_sort" ON "public"."sys_dict_data" USING btree (
    "sort" "pg_catalog"."int4_ops" ASC NULLS LAST
    );
CREATE UNIQUE INDEX "uk_dict_type_value" ON "public"."sys_dict_data" USING btree (
    "dict_type_id" "pg_catalog"."int8_ops" ASC NULLS LAST,
    "dict_value" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_dict_data
-- ----------------------------
ALTER TABLE "public"."sys_dict_data"
    ADD CONSTRAINT "sys_dict_data_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_dict_type
-- ----------------------------
CREATE UNIQUE INDEX "uk_sys_dict_type_dict_type" ON "public"."sys_dict_type" USING btree (
    "dict_type" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_dict_type
-- ----------------------------
ALTER TABLE "public"."sys_dict_type"
    ADD CONSTRAINT "sys_dict_type_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_log_error
-- ----------------------------
CREATE INDEX "idx_error_create_date" ON "public"."sys_log_error" USING btree (
    "create_date" "pg_catalog"."timestamp_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_log_error
-- ----------------------------
ALTER TABLE "public"."sys_log_error"
    ADD CONSTRAINT "sys_log_error_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_log_login
-- ----------------------------
CREATE INDEX "idx_login_create_date" ON "public"."sys_log_login" USING btree (
    "create_date" "pg_catalog"."timestamp_ops" ASC NULLS LAST
    );
CREATE INDEX "idx_login_status" ON "public"."sys_log_login" USING btree (
    "status" "pg_catalog"."int4_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_log_login
-- ----------------------------
ALTER TABLE "public"."sys_log_login"
    ADD CONSTRAINT "sys_log_login_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_log_operation
-- ----------------------------
CREATE INDEX "idx_operation_create_date" ON "public"."sys_log_operation" USING btree (
    "create_date" "pg_catalog"."timestamp_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_log_operation
-- ----------------------------
ALTER TABLE "public"."sys_log_operation"
    ADD CONSTRAINT "sys_log_operation_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_menu
-- ----------------------------
CREATE INDEX "idx_sys_menu_pid" ON "public"."sys_menu" USING btree (
    "pid" "pg_catalog"."int8_ops" ASC NULLS LAST
    );
CREATE INDEX "idx_sys_menu_sort" ON "public"."sys_menu" USING btree (
    "sort" "pg_catalog"."int4_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_menu
-- ----------------------------
ALTER TABLE "public"."sys_menu"
    ADD CONSTRAINT "sys_menu_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_params
-- ----------------------------
CREATE INDEX "idx_sys_params_create_date" ON "public"."sys_params" USING btree (
    "create_date" "pg_catalog"."timestamp_ops" ASC NULLS LAST
    );
CREATE UNIQUE INDEX "uk_sys_params_param_code" ON "public"."sys_params" USING btree (
    "param_code" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_params
-- ----------------------------
ALTER TABLE "public"."sys_params"
    ADD CONSTRAINT "sys_params_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_role
-- ----------------------------
CREATE INDEX "idx_sys_role_dept_id" ON "public"."sys_role" USING btree (
    "dept_id" "pg_catalog"."int8_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_role
-- ----------------------------
ALTER TABLE "public"."sys_role"
    ADD CONSTRAINT "sys_role_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_role_data_scope
-- ----------------------------
CREATE INDEX "idx_data_scope_role_id" ON "public"."sys_role_data_scope" USING btree (
    "role_id" "pg_catalog"."int8_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_role_data_scope
-- ----------------------------
ALTER TABLE "public"."sys_role_data_scope"
    ADD CONSTRAINT "sys_role_data_scope_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_role_menu
-- ----------------------------
CREATE INDEX "idx_sys_role_menu_menu_id" ON "public"."sys_role_menu" USING btree (
    "menu_id" "pg_catalog"."int8_ops" ASC NULLS LAST
    );
CREATE INDEX "idx_sys_role_menu_role_id" ON "public"."sys_role_menu" USING btree (
    "role_id" "pg_catalog"."int8_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_role_menu
-- ----------------------------
ALTER TABLE "public"."sys_role_menu"
    ADD CONSTRAINT "sys_role_menu_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_role_user
-- ----------------------------
CREATE INDEX "idx_sys_role_user_role_id" ON "public"."sys_role_user" USING btree (
    "role_id" "pg_catalog"."int8_ops" ASC NULLS LAST
    );
CREATE INDEX "idx_sys_role_user_user_id" ON "public"."sys_role_user" USING btree (
    "user_id" "pg_catalog"."int8_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_role_user
-- ----------------------------
ALTER TABLE "public"."sys_role_user"
    ADD CONSTRAINT "sys_role_user_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_user
-- ----------------------------
CREATE INDEX "idx_sys_user_create_date" ON "public"."sys_user" USING btree (
    "create_date" "pg_catalog"."timestamp_ops" ASC NULLS LAST
    );
CREATE UNIQUE INDEX "uk_sys_user_username" ON "public"."sys_user" USING btree (
    "username" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_user
-- ----------------------------
ALTER TABLE "public"."sys_user"
    ADD CONSTRAINT "sys_user_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_user_token
-- ----------------------------
CREATE UNIQUE INDEX "uk_sys_user_token" ON "public"."sys_user_token" USING btree (
    "token" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
    );
CREATE UNIQUE INDEX "uk_sys_user_token_user_id" ON "public"."sys_user_token" USING btree (
    "user_id" "pg_catalog"."int8_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table sys_user_token
-- ----------------------------
ALTER TABLE "public"."sys_user_token"
    ADD CONSTRAINT "sys_user_token_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Table structure for bus_dock
-- ----------------------------
DROP TABLE IF EXISTS "public"."bus_dock";
CREATE TABLE "public"."bus_dock"
(
    "id"               int8                                       NOT NULL,
    "dock_name"        varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
    "dock_sn"          varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
    "dock_type"        varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
    "dock_model"       varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
    "dept_id"          int8                                       NOT NULL,
    "dock_longitude"   float8,
    "dock_latitude"    float8,
    "dock_height"      float8,
    "deputy_longitude" float8,
    "deputy_latitude"  float8,
    "deputy_height"    float8,
    "remarks"          varchar(255) COLLATE "pg_catalog"."default",
    "del_flag"         int2                                       NOT NULL DEFAULT 0,
    "creator"          int8,
    "create_date"      timestamp(6),
    "updater"          int8,
    "update_date"      timestamp(6)
)
;
COMMENT
ON COLUMN "public"."bus_dock"."id" IS '主键';
COMMENT
ON COLUMN "public"."bus_dock"."dock_name" IS '机库名称';
COMMENT
ON COLUMN "public"."bus_dock"."dock_sn" IS 'SN码';
COMMENT
ON COLUMN "public"."bus_dock"."dock_type" IS '机库类型';
COMMENT
ON COLUMN "public"."bus_dock"."dock_model" IS '机库型号';
COMMENT
ON COLUMN "public"."bus_dock"."dept_id" IS '所属部门';
COMMENT
ON COLUMN "public"."bus_dock"."dock_longitude" IS '机库经度';
COMMENT
ON COLUMN "public"."bus_dock"."dock_latitude" IS '机库纬度';
COMMENT
ON COLUMN "public"."bus_dock"."dock_height" IS '机库高度（椭球高）';
COMMENT
ON COLUMN "public"."bus_dock"."deputy_longitude" IS '备降点经度';
COMMENT
ON COLUMN "public"."bus_dock"."deputy_latitude" IS '备降点纬度';
COMMENT
ON COLUMN "public"."bus_dock"."deputy_height" IS '备降点高度';
COMMENT
ON COLUMN "public"."bus_dock"."remarks" IS '备注';
COMMENT
ON COLUMN "public"."bus_dock"."del_flag" IS '删除标志：-1：已删除  0：未删除';
COMMENT
ON TABLE "public"."bus_dock" IS '机库信息表';

-- ----------------------------
-- Records of bus_dock
-- ----------------------------
INSERT INTO "public"."bus_dock"
VALUES (2045078929596768257, '大疆机场3', '4TADL2L001003D', 'DJI', 'dock_3', 1067246875800000066, NULL, NULL, NULL,
        NULL, NULL, NULL, '用来测试的机场，请勿删除', 0, 1067246875800000001, '2026-04-17 17:56:27.202',
        1067246875800000001, '2026-04-17 18:00:43.103');

-- ----------------------------
-- Primary Key structure for table bus_dock
-- ----------------------------
ALTER TABLE "public"."bus_dock"
    ADD CONSTRAINT "bus_dock_pkey" PRIMARY KEY ("id");