-- ----------------------------
-- 1、存储每一个已配置的 jobDetail 的详细信息
-- ----------------------------
create table QRTZ_JOB_DETAILS (
                                  sched_name           varchar(120)    not null            comment '调度名称',
                                  job_name             varchar(200)    not null            comment '任务名称',
                                  job_group            varchar(200)    not null            comment '任务组名',
                                  description          varchar(250)    null                comment '相关介绍',
                                  job_class_name       varchar(250)    not null            comment '执行任务类名称',
                                  is_durable           varchar(1)      not null            comment '是否持久化',
                                  is_nonconcurrent     varchar(1)      not null            comment '是否并发',
                                  is_update_data       varchar(1)      not null            comment '是否更新数据',
                                  requests_recovery    varchar(1)      not null            comment '是否接受恢复执行',
                                  job_data             blob            null                comment '存放持久化job对象',
                                  primary key (sched_name, job_name, job_group)
) engine=innodb comment = '任务详细信息表';

-- ----------------------------
-- 2、 存储已配置的 Trigger 的信息
-- ----------------------------
create table QRTZ_TRIGGERS (
                               sched_name           varchar(120)    not null            comment '调度名称',
                               trigger_name         varchar(200)    not null            comment '触发器的名字',
                               trigger_group        varchar(200)    not null            comment '触发器所属组的名字',
                               job_name             varchar(200)    not null            comment 'qrtz_job_details表job_name的外键',
                               job_group            varchar(200)    not null            comment 'qrtz_job_details表job_group的外键',
                               description          varchar(250)    null                comment '相关介绍',
                               next_fire_time       bigint(13)      null                comment '上一次触发时间（毫秒）',
                               prev_fire_time       bigint(13)      null                comment '下一次触发时间（默认为-1表示不触发）',
                               priority             integer         null                comment '优先级',
                               trigger_state        varchar(16)     not null            comment '触发器状态',
                               trigger_type         varchar(8)      not null            comment '触发器的类型',
                               start_time           bigint(13)      not null            comment '开始时间',
                               end_time             bigint(13)      null                comment '结束时间',
                               calendar_name        varchar(200)    null                comment '日程表名称',
                               misfire_instr        smallint(2)     null                comment '补偿执行的策略',
                               job_data             blob            null                comment '存放持久化job对象',
                               primary key (sched_name, trigger_name, trigger_group),
                               foreign key (sched_name, job_name, job_group) references QRTZ_JOB_DETAILS(sched_name, job_name, job_group)
) engine=innodb comment = '触发器详细信息表';

-- ----------------------------
-- 3、 存储简单的 Trigger，包括重复次数，间隔，以及已触发的次数
-- ----------------------------
create table QRTZ_SIMPLE_TRIGGERS (
                                      sched_name           varchar(120)    not null            comment '调度名称',
                                      trigger_name         varchar(200)    not null            comment 'qrtz_triggers表trigger_name的外键',
                                      trigger_group        varchar(200)    not null            comment 'qrtz_triggers表trigger_group的外键',
                                      repeat_count         bigint(7)       not null            comment '重复的次数统计',
                                      repeat_interval      bigint(12)      not null            comment '重复的间隔时间',
                                      times_triggered      bigint(10)      not null            comment '已经触发的次数',
                                      primary key (sched_name, trigger_name, trigger_group),
                                      foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
) engine=innodb comment = '简单触发器的信息表';

-- ----------------------------
-- 4、 存储 Cron Trigger，包括 Cron 表达式和时区信息
-- ----------------------------
create table QRTZ_CRON_TRIGGERS (
                                    sched_name           varchar(120)    not null            comment '调度名称',
                                    trigger_name         varchar(200)    not null            comment 'qrtz_triggers表trigger_name的外键',
                                    trigger_group        varchar(200)    not null            comment 'qrtz_triggers表trigger_group的外键',
                                    cron_expression      varchar(200)    not null            comment 'cron表达式',
                                    time_zone_id         varchar(80)                         comment '时区',
                                    primary key (sched_name, trigger_name, trigger_group),
                                    foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
) engine=innodb comment = 'Cron类型的触发器表';

-- ----------------------------
-- 5、 Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型，JobStore 并不知道如何存储实例的时候)
-- ----------------------------
create table QRTZ_BLOB_TRIGGERS (
                                    sched_name           varchar(120)    not null            comment '调度名称',
                                    trigger_name         varchar(200)    not null            comment 'qrtz_triggers表trigger_name的外键',
                                    trigger_group        varchar(200)    not null            comment 'qrtz_triggers表trigger_group的外键',
                                    blob_data            blob            null                comment '存放持久化Trigger对象',
                                    primary key (sched_name, trigger_name, trigger_group),
                                    foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
) engine=innodb comment = 'Blob类型的触发器表';

-- ----------------------------
-- 6、 以 Blob 类型存储存放日历信息， quartz可配置一个日历来指定一个时间范围
-- ----------------------------
create table QRTZ_CALENDARS (
                                sched_name           varchar(120)    not null            comment '调度名称',
                                calendar_name        varchar(200)    not null            comment '日历名称',
                                calendar             blob            not null            comment '存放持久化calendar对象',
                                primary key (sched_name, calendar_name)
) engine=innodb comment = '日历信息表';

-- ----------------------------
-- 7、 存储已暂停的 Trigger 组的信息
-- ----------------------------
create table QRTZ_PAUSED_TRIGGER_GRPS (
                                          sched_name           varchar(120)    not null            comment '调度名称',
                                          trigger_group        varchar(200)    not null            comment 'qrtz_triggers表trigger_group的外键',
                                          primary key (sched_name, trigger_group)
) engine=innodb comment = '暂停的触发器表';

-- ----------------------------
-- 8、 存储与已触发的 Trigger 相关的状态信息，以及相联 Job 的执行信息
-- ----------------------------
create table QRTZ_FIRED_TRIGGERS (
                                     sched_name           varchar(120)    not null            comment '调度名称',
                                     entry_id             varchar(95)     not null            comment '调度器实例id',
                                     trigger_name         varchar(200)    not null            comment 'qrtz_triggers表trigger_name的外键',
                                     trigger_group        varchar(200)    not null            comment 'qrtz_triggers表trigger_group的外键',
                                     instance_name        varchar(200)    not null            comment '调度器实例名',
                                     fired_time           bigint(13)      not null            comment '触发的时间',
                                     sched_time           bigint(13)      not null            comment '定时器制定的时间',
                                     priority             integer         not null            comment '优先级',
                                     state                varchar(16)     not null            comment '状态',
                                     job_name             varchar(200)    null                comment '任务名称',
                                     job_group            varchar(200)    null                comment '任务组名',
                                     is_nonconcurrent     varchar(1)      null                comment '是否并发',
                                     requests_recovery    varchar(1)      null                comment '是否接受恢复执行',
                                     primary key (sched_name, entry_id)
) engine=innodb comment = '已触发的触发器表';

-- ----------------------------
-- 9、 存储少量的有关 Scheduler 的状态信息，假如是用于集群中，可以看到其他的 Scheduler 实例
-- ----------------------------
create table QRTZ_SCHEDULER_STATE (
                                      sched_name           varchar(120)    not null            comment '调度名称',
                                      instance_name        varchar(200)    not null            comment '实例名称',
                                      last_checkin_time    bigint(13)      not null            comment '上次检查时间',
                                      checkin_interval     bigint(13)      not null            comment '检查间隔时间',
                                      primary key (sched_name, instance_name)
) engine=innodb comment = '调度器状态表';

-- ----------------------------
-- 10、 存储程序的悲观锁的信息(假如使用了悲观锁)
-- ----------------------------
create table QRTZ_LOCKS (
                            sched_name           varchar(120)    not null            comment '调度名称',
                            lock_name            varchar(40)     not null            comment '悲观锁名称',
                            primary key (sched_name, lock_name)
) engine=innodb comment = '存储的悲观锁信息表';

-- ----------------------------
-- 11、 Quartz集群实现同步机制的行锁表
-- ----------------------------
create table QRTZ_SIMPROP_TRIGGERS (
                                       sched_name           varchar(120)    not null            comment '调度名称',
                                       trigger_name         varchar(200)    not null            comment 'qrtz_triggers表trigger_name的外键',
                                       trigger_group        varchar(200)    not null            comment 'qrtz_triggers表trigger_group的外键',
                                       str_prop_1           varchar(512)    null                comment 'String类型的trigger的第一个参数',
                                       str_prop_2           varchar(512)    null                comment 'String类型的trigger的第二个参数',
                                       str_prop_3           varchar(512)    null                comment 'String类型的trigger的第三个参数',
                                       int_prop_1           int             null                comment 'int类型的trigger的第一个参数',
                                       int_prop_2           int             null                comment 'int类型的trigger的第二个参数',
                                       long_prop_1          bigint          null                comment 'long类型的trigger的第一个参数',
                                       long_prop_2          bigint          null                comment 'long类型的trigger的第二个参数',
                                       dec_prop_1           numeric(13,4)   null                comment 'decimal类型的trigger的第一个参数',
                                       dec_prop_2           numeric(13,4)   null                comment 'decimal类型的trigger的第二个参数',
                                       bool_prop_1          varchar(1)      null                comment 'Boolean类型的trigger的第一个参数',
                                       bool_prop_2          varchar(1)      null                comment 'Boolean类型的trigger的第二个参数',
                                       primary key (sched_name, trigger_name, trigger_group),
                                       foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
) engine=innodb comment = '同步机制的行锁表';

CREATE TABLE `sys_auth_user` (
  `auth_id` bigint NOT NULL AUTO_INCREMENT COMMENT '授权ID',
  `uuid` varchar(500) NOT NULL COMMENT '第三方平台用户唯一ID',
  `user_id` bigint NOT NULL COMMENT '系统用户ID',
  `login_name` varchar(30) NOT NULL COMMENT '登录账号',
  `user_name` varchar(30) DEFAULT '' COMMENT '用户昵称',
  `avatar` varchar(500) DEFAULT '' COMMENT '头像地址',
  `email` varchar(255) DEFAULT '' COMMENT '用户邮箱',
  `source` varchar(255) DEFAULT '' COMMENT '用户来源',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`auth_id`)
) ENGINE=InnoDB COMMENT='第三方授权表';


LOCK TABLES `sys_auth_user` WRITE;

UNLOCK TABLES;


CREATE TABLE `sys_config` (
  `config_id` int NOT NULL AUTO_INCREMENT COMMENT '参数主键',
  `config_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '参数名称',
  `config_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '参数键名',
  `config_value` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '参数键值',
  `config_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'N' COMMENT '系统内置（Y是 N否）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`config_id`) USING BTREE
) ENGINE=InnoDB COMMENT='参数配置表';


LOCK TABLES `sys_config` WRITE;

INSERT INTO `sys_config` VALUES (1,'主框架页-默认皮肤样式名称','sys.index.skinName','skin-blue','Y','admin','2021-02-08 10:51:14','',NULL,'蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow'),(2,'用户管理-账号初始密码','sys.user.initPassword','123456','Y','admin','2021-02-08 10:51:14','',NULL,'初始化密码 123456'),(3,'主框架页-侧边栏主题','sys.index.sideTheme','theme-dark','Y','admin','2021-02-08 10:51:14','',NULL,'深黑主题theme-dark，浅色主题theme-light，深蓝主题theme-blue'),(4,'账号自助-是否开启用户注册功能','sys.account.registerUser','false','Y','admin','2021-02-08 10:51:14','',NULL,'是否开启注册用户功能（true开启，false关闭）'),(5,'用户管理-密码字符范围','sys.account.chrtype','0','Y','admin','2021-02-08 10:51:14','',NULL,'默认任意字符范围，0任意（密码可以输入任意字符），1数字（密码只能为0-9数字），2英文字母（密码只能为a-z和A-Z字母），3字母和数字（密码必须包含字母，数字）,4字母数字和特殊字符（目前支持的特殊字符包括：~!@#$%^&*()-=_+）'),(6,'用户管理-初始密码修改策略','sys.account.initPasswordModify','0','Y','admin','2021-02-08 10:51:14','',NULL,'0：初始密码修改策略关闭，没有任何提示，1：提醒用户，如果未修改初始密码，则在登录时就会提醒修改密码对话框'),(7,'用户管理-账号密码更新周期','sys.account.passwordValidateDays','0','Y','admin','2021-02-08 10:51:14','',NULL,'密码更新周期（填写数字，数据初始化值为0不限制，若修改必须为大于0小于365的正整数），如果超过这个周期登录系统时，则在登录时就会提醒修改密码对话框'),(8,'主框架页-菜单导航显示风格','sys.index.menuStyle','default','Y','admin','2021-02-08 10:51:14','',NULL,'菜单导航显示风格（default为左侧导航菜单，topnav为顶部导航菜单）'),(9,'主框架页-是否开启页脚','sys.index.ignoreFooter','true','Y','admin','2021-02-08 10:51:14','',NULL,'是否开启底部页脚显示（true显示，false隐藏）');

UNLOCK TABLES;


CREATE TABLE `sys_dept` (
  `dept_id` bigint NOT NULL AUTO_INCREMENT COMMENT '部门id',
  `parent_id` bigint DEFAULT '0' COMMENT '父部门id',
  `ancestors` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '祖级列表',
  `dept_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '部门名称',
  `order_num` int DEFAULT '0' COMMENT '显示顺序',
  `leader_id` bigint DEFAULT NULL COMMENT '负责人ID',
  `leader` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '负责人',
  `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '联系电话',
  `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '邮箱',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '部门状态（0正常 1停用）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志（0代表存在 2代表删除）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`dept_id`) USING BTREE
) ENGINE=InnoDB COMMENT='部门表';


LOCK TABLES `sys_dept` WRITE;

INSERT INTO `sys_dept` VALUES (100,0,'0','至存网络DEMO',0,NULL,'若依','15888888888','ry@qq.com','0','0','admin','2021-02-08 10:51:14','liangxia','2022-04-06 09:12:34');

UNLOCK TABLES;

CREATE TABLE `sys_dict_data` (
  `dict_code` bigint NOT NULL AUTO_INCREMENT COMMENT '字典编码',
  `dict_sort` int DEFAULT '0' COMMENT '字典排序',
  `dict_label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '字典标签',
  `dict_value` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '字典键值',
  `dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '字典类型',
  `css_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '样式属性（其他样式扩展）',
  `list_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '表格回显样式',
  `is_default` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'N' COMMENT '是否默认（Y是 N否）',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态（0正常 1停用）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`dict_code`) USING BTREE
) ENGINE=InnoDB COMMENT='字典数据表';


LOCK TABLES `sys_dict_data` WRITE;

INSERT INTO `sys_dict_data` VALUES (1,1,'男','0','sys_user_sex','','','Y','0','admin','2021-02-08 10:51:14','',NULL,'性别男'),(2,2,'女','1','sys_user_sex','','','N','0','admin','2021-02-08 10:51:14','',NULL,'性别女'),(3,3,'未知','2','sys_user_sex','','','N','0','admin','2021-02-08 10:51:14','',NULL,'性别未知'),(4,1,'显示','0','sys_show_hide','','primary','Y','0','admin','2021-02-08 10:51:14','',NULL,'显示菜单'),(5,2,'隐藏','1','sys_show_hide','','danger','N','0','admin','2021-02-08 10:51:14','',NULL,'隐藏菜单'),(6,1,'正常','0','sys_normal_disable','','primary','Y','0','admin','2021-02-08 10:51:14','',NULL,'正常状态'),(7,2,'停用','1','sys_normal_disable','','danger','N','0','admin','2021-02-08 10:51:14','',NULL,'停用状态'),(8,1,'正常','0','sys_job_status','','primary','Y','0','admin','2021-02-08 10:51:14','',NULL,'正常状态'),(9,2,'暂停','1','sys_job_status','','danger','N','0','admin','2021-02-08 10:51:14','',NULL,'停用状态'),(10,1,'默认','DEFAULT','sys_job_group','','','Y','0','admin','2021-02-08 10:51:14','',NULL,'默认分组'),(11,2,'系统','SYSTEM','sys_job_group','','','N','0','admin','2021-02-08 10:51:14','',NULL,'系统分组'),(12,1,'是','Y','sys_yes_no','','primary','Y','0','admin','2021-02-08 10:51:14','',NULL,'系统默认是'),(13,2,'否','N','sys_yes_no','','danger','N','0','admin','2021-02-08 10:51:14','',NULL,'系统默认否'),(14,1,'通知','1','sys_notice_type','','warning','Y','0','admin','2021-02-08 10:51:14','',NULL,'通知'),(15,2,'公告','2','sys_notice_type','','success','N','0','admin','2021-02-08 10:51:14','',NULL,'公告'),(16,1,'正常','0','sys_notice_status','','primary','Y','0','admin','2021-02-08 10:51:14','',NULL,'正常状态'),(17,2,'关闭','1','sys_notice_status','','danger','N','0','admin','2021-02-08 10:51:14','',NULL,'关闭状态'),(18,99,'其他','0','sys_oper_type','','info','N','0','admin','2021-02-08 10:51:14','',NULL,'其他操作'),(19,1,'新增','1','sys_oper_type','','info','N','0','admin','2021-02-08 10:51:14','',NULL,'新增操作'),(20,2,'修改','2','sys_oper_type','','info','N','0','admin','2021-02-08 10:51:14','',NULL,'修改操作'),(21,3,'删除','3','sys_oper_type','','danger','N','0','admin','2021-02-08 10:51:14','',NULL,'删除操作'),(22,4,'授权','4','sys_oper_type','','primary','N','0','admin','2021-02-08 10:51:14','',NULL,'授权操作'),(23,5,'导出','5','sys_oper_type','','warning','N','0','admin','2021-02-08 10:51:14','',NULL,'导出操作'),(24,6,'导入','6','sys_oper_type','','warning','N','0','admin','2021-02-08 10:51:14','',NULL,'导入操作'),(25,7,'强退','7','sys_oper_type','','danger','N','0','admin','2021-02-08 10:51:14','',NULL,'强退操作'),(26,8,'生成代码','8','sys_oper_type','','warning','N','0','admin','2021-02-08 10:51:14','',NULL,'生成操作'),(27,9,'清空数据','9','sys_oper_type','','danger','N','0','admin','2021-02-08 10:51:14','',NULL,'清空操作'),(28,1,'成功','0','sys_common_status','','primary','N','0','admin','2021-02-08 10:51:14','',NULL,'正常状态'),(29,2,'失败','1','sys_common_status','','danger','N','0','admin','2021-02-08 10:51:14','',NULL,'停用状态'),(30,1,'正常','0','common_status',NULL,'primary','Y','0','admin','2021-02-09 14:04:00','',NULL,NULL),(31,2,'停用','1','common_status',NULL,'danger','N','0','admin','2021-02-09 14:04:31','',NULL,NULL),(32,1,'正常','1','cnt_status','','info','Y','0','admin','2022-03-14 08:03:36','admin','2022-03-14 08:03:56',''),(33,2,'已完成','2','cnt_status',NULL,'warning','N','0','admin','2022-03-14 08:04:29','',NULL,NULL),(34,3,'已停止','3','cnt_status',NULL,'danger','N','0','admin','2022-03-14 08:04:47','',NULL,NULL),(35,1,'分期支付','1','cnt_pay_mode',NULL,NULL,'Y','0','admin','2022-03-14 08:05:16','',NULL,NULL),(36,2,'一次性支付','2','cnt_pay_mode',NULL,NULL,'N','0','admin','2022-03-14 08:05:29','',NULL,NULL),(37,1,'正常','1','project_status',NULL,'info','Y','0','admin','2022-03-14 08:06:08','',NULL,NULL),(38,2,'已完成','2','project_status','','warning','N','0','admin','2022-03-14 08:06:22','admin','2022-03-14 08:06:28',''),(39,3,'已停用','3','project_status',NULL,'danger','N','0','admin','2022-03-14 08:06:45','',NULL,NULL),(40,1,'未收款','1','cnt_pay_status','','danger','Y','0','admin','2022-03-14 08:07:14','admin','2022-03-31 07:52:44',''),(41,2,'部分收款','2','cnt_pay_status',NULL,'info','N','0','admin','2022-03-14 08:07:26','',NULL,NULL),(42,3,'收款完成','3','cnt_pay_status','','warning','Y','0','admin','2022-03-14 08:07:41','admin','2022-03-31 07:52:56',''),(43,3,'按工时支付','3','cnt_pay_mode',NULL,NULL,'N','0','admin','2022-05-31 14:58:32','',NULL,NULL),(44,4,'按销售额提成','4','cnt_pay_mode',NULL,NULL,'N','0','admin','2022-05-31 14:58:47','',NULL,NULL),(45,5,'按利润提成','5','cnt_pay_mode',NULL,NULL,'N','0','admin','2022-05-31 14:58:58','',NULL,NULL);

UNLOCK TABLES;

CREATE TABLE `sys_dict_type` (
  `dict_id` bigint NOT NULL AUTO_INCREMENT COMMENT '字典主键',
  `dict_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '字典名称',
  `dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '字典类型',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态（0正常 1停用）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`dict_id`) USING BTREE,
  UNIQUE KEY `dict_type` (`dict_type`) USING BTREE
) ENGINE=InnoDB COMMENT='字典类型表';

LOCK TABLES `sys_dict_type` WRITE;

INSERT INTO `sys_dict_type` VALUES (1,'用户性别','sys_user_sex','0','admin','2021-02-08 10:51:14','',NULL,'用户性别列表'),(2,'菜单状态','sys_show_hide','0','admin','2021-02-08 10:51:14','',NULL,'菜单状态列表'),(3,'系统开关','sys_normal_disable','0','admin','2021-02-08 10:51:14','',NULL,'系统开关列表'),(4,'任务状态','sys_job_status','0','admin','2021-02-08 10:51:14','',NULL,'任务状态列表'),(5,'任务分组','sys_job_group','0','admin','2021-02-08 10:51:14','',NULL,'任务分组列表'),(6,'系统是否','sys_yes_no','0','admin','2021-02-08 10:51:14','',NULL,'系统是否列表'),(7,'通知类型','sys_notice_type','0','admin','2021-02-08 10:51:14','',NULL,'通知类型列表'),(8,'通知状态','sys_notice_status','0','admin','2021-02-08 10:51:14','',NULL,'通知状态列表'),(9,'操作类型','sys_oper_type','0','admin','2021-02-08 10:51:14','',NULL,'操作类型列表'),(10,'系统状态','sys_common_status','0','admin','2021-02-08 10:51:14','',NULL,'登录状态列表'),(11,'通用状态','common_status','0','admin','2021-02-09 14:01:51','',NULL,NULL),(12,'合同状态','cnt_status','0','admin','2022-03-14 08:02:26','',NULL,NULL),(13,'合同付款方式','cnt_pay_mode','0','admin','2022-03-14 08:02:44','',NULL,NULL),(14,'项目状态','project_status','0','admin','2022-03-14 08:02:58','',NULL,NULL),(15,'合同收款状态','cnt_pay_status','0','admin','2022-03-14 08:03:11','',NULL,NULL);

UNLOCK TABLES;


CREATE TABLE `sys_job` (
  `job_id` bigint NOT NULL AUTO_INCREMENT COMMENT '任务ID',
  `job_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务名称',
  `job_group` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'DEFAULT' COMMENT '任务组名',
  `invoke_target` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调用目标字符串',
  `cron_expression` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'cron执行表达式',
  `misfire_policy` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '3' COMMENT '计划执行错误策略（1立即执行 2执行一次 3放弃执行）',
  `concurrent` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '是否并发执行（0允许 1禁止）',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态（0正常 1暂停）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '备注信息',
  PRIMARY KEY (`job_id`,`job_name`,`job_group`) USING BTREE
) ENGINE=InnoDB COMMENT='定时任务调度表';

LOCK TABLES `sys_job` WRITE;

INSERT INTO `sys_job` VALUES (1,'系统默认（无参）','DEFAULT','ryTask.ryNoParams','0/10 * * * * ?','3','1','1','admin','2021-02-08 10:51:14','',NULL,''),(2,'系统默认（有参）','DEFAULT','ryTask.ryParams(\'ry\')','0/15 * * * * ?','3','1','1','admin','2021-02-08 10:51:14','',NULL,''),(3,'系统默认（多参）','DEFAULT','ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)','0/20 * * * * ?','3','1','1','admin','2021-02-08 10:51:14','',NULL,'');

UNLOCK TABLES;

CREATE TABLE `sys_job_log` (
  `job_log_id` bigint NOT NULL AUTO_INCREMENT COMMENT '任务日志ID',
  `job_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务名称',
  `job_group` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务组名',
  `invoke_target` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调用目标字符串',
  `job_message` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '日志信息',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '执行状态（0正常 1失败）',
  `exception_info` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '异常信息',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`job_log_id`) USING BTREE
) ENGINE=InnoDB COMMENT='定时任务调度日志表';

LOCK TABLES `sys_job_log` WRITE;

UNLOCK TABLES;

CREATE TABLE `sys_logininfor` (
  `info_id` bigint NOT NULL AUTO_INCREMENT COMMENT '访问ID',
  `login_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '登录账号',
  `ipaddr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '登录IP地址',
  `login_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '登录地点',
  `browser` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '浏览器类型',
  `os` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '操作系统',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '登录状态（0成功 1失败）',
  `msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '提示消息',
  `login_time` datetime DEFAULT NULL COMMENT '访问时间',
  PRIMARY KEY (`info_id`) USING BTREE
) ENGINE=InnoDB COMMENT='系统访问记录';

LOCK TABLES `sys_logininfor` WRITE;
UNLOCK TABLES;

CREATE TABLE `sys_menu` (
  `menu_id` bigint NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
  `menu_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '菜单名称',
  `parent_id` bigint DEFAULT '0' COMMENT '父菜单ID',
  `order_num` int DEFAULT '0' COMMENT '显示顺序',
  `url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '#' COMMENT '请求地址',
  `target` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '打开方式（menuItem页签 menuBlank新窗口）',
  `menu_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '菜单类型（M目录 C菜单 F按钮）',
  `visible` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '菜单状态（0显示 1隐藏）',
  `is_refresh` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '是否刷新（0刷新 1不刷新）',
  `perms` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '权限标识',
  `icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '#' COMMENT '菜单图标',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '备注',
  PRIMARY KEY (`menu_id`) USING BTREE
) ENGINE=InnoDB COMMENT='菜单权限表';

LOCK TABLES `sys_menu` WRITE;
INSERT INTO `sys_menu` VALUES (1,'系统管理',0,1,'#','','M','0','1','','fa fa-gear','admin','2021-02-08 10:51:14','',NULL,'系统管理目录'),(2,'系统监控',0,2,'#','','M','0','1','','fa fa-video-camera','admin','2021-02-08 10:51:14','',NULL,'系统监控目录'),(3,'系统工具',0,3,'#','menuItem','M','1','1','','fa fa-bars','admin','2021-02-08 10:51:14','admin','2022-10-20 14:35:43','系统工具目录'),(4,'若依官网',0,4,'http://ruoyi.vip','menuBlank','C','1','1','','fa fa-location-arrow','admin','2021-02-08 10:51:14','admin','2021-02-08 13:09:55','若依官网地址'),(100,'用户管理',1,1,'/system/user','','C','0','1','system:user:view','fa fa-user-o','admin','2021-02-08 10:51:14','',NULL,'用户管理菜单'),(101,'角色管理',1,2,'/system/role','','C','0','1','system:role:view','fa fa-user-secret','admin','2021-02-08 10:51:14','',NULL,'角色管理菜单'),(102,'菜单管理',1,3,'/system/menu','','C','0','1','system:menu:view','fa fa-th-list','admin','2021-02-08 10:51:14','',NULL,'菜单管理菜单'),(103,'部门管理',1,4,'/system/dept','','C','0','1','system:dept:view','fa fa-outdent','admin','2021-02-08 10:51:14','',NULL,'部门管理菜单'),(104,'岗位管理',1,5,'/system/post','','C','0','1','system:post:view','fa fa-address-card-o','admin','2021-02-08 10:51:14','',NULL,'岗位管理菜单'),(105,'字典管理',1,6,'/system/dict','','C','0','1','system:dict:view','fa fa-bookmark-o','admin','2021-02-08 10:51:14','',NULL,'字典管理菜单'),(106,'参数设置',1,7,'/system/config','','C','0','1','system:config:view','fa fa-sun-o','admin','2021-02-08 10:51:14','',NULL,'参数设置菜单'),(107,'通知公告',1,8,'/system/notice','','C','0','1','system:notice:view','fa fa-bullhorn','admin','2021-02-08 10:51:14','',NULL,'通知公告菜单'),(108,'日志管理',1,9,'#','','M','0','1','','fa fa-pencil-square-o','admin','2021-02-08 10:51:14','',NULL,'日志管理菜单'),(109,'在线用户',2,1,'/monitor/online','','C','0','1','monitor:online:view','fa fa-user-circle','admin','2021-02-08 10:51:14','',NULL,'在线用户菜单'),(110,'定时任务',2,2,'/monitor/job','','C','0','1','monitor:job:view','fa fa-tasks','admin','2021-02-08 10:51:14','',NULL,'定时任务菜单'),(111,'数据监控',2,3,'/monitor/data','','C','0','1','monitor:data:view','fa fa-bug','admin','2021-02-08 10:51:14','',NULL,'数据监控菜单'),(112,'服务监控',2,4,'/monitor/server','','C','0','1','monitor:server:view','fa fa-server','admin','2021-02-08 10:51:14','',NULL,'服务监控菜单'),(113,'缓存监控',2,5,'/monitor/cache','','C','0','1','monitor:cache:view','fa fa-cube','admin','2021-02-08 10:51:14','',NULL,'缓存监控菜单'),(114,'表单构建',3,1,'/tool/build','menuItem','C','1','1','tool:build:view','fa fa-wpforms','admin','2021-02-08 10:51:14','admin','2022-10-20 14:35:18','表单构建菜单'),(115,'代码生成',3,2,'/tool/gen','menuItem','C','1','1','tool:gen:view','fa fa-code','admin','2021-02-08 10:51:14','admin','2022-10-20 14:35:24','代码生成菜单'),(116,'系统接口',3,3,'/tool/swagger','menuItem','C','1','1','tool:swagger:view','fa fa-gg','admin','2021-02-08 10:51:14','admin','2022-10-20 14:35:33','系统接口菜单'),(500,'操作日志',108,1,'/monitor/operlog','','C','0','1','monitor:operlog:view','fa fa-address-book','admin','2021-02-08 10:51:14','',NULL,'操作日志菜单'),(501,'登录日志',108,2,'/monitor/logininfor','','C','0','1','monitor:logininfor:view','fa fa-file-image-o','admin','2021-02-08 10:51:14','',NULL,'登录日志菜单'),(1000,'用户查询',100,1,'#','','F','0','1','system:user:list','#','admin','2021-02-08 10:51:14','',NULL,''),(1001,'用户新增',100,2,'#','','F','0','1','system:user:add','#','admin','2021-02-08 10:51:14','',NULL,''),(1002,'用户修改',100,3,'#','','F','0','1','system:user:edit','#','admin','2021-02-08 10:51:14','',NULL,''),(1003,'用户删除',100,4,'#','','F','0','1','system:user:remove','#','admin','2021-02-08 10:51:14','',NULL,''),(1004,'用户导出',100,5,'#','','F','0','1','system:user:export','#','admin','2021-02-08 10:51:14','',NULL,''),(1005,'用户导入',100,6,'#','','F','0','1','system:user:import','#','admin','2021-02-08 10:51:14','',NULL,''),(1006,'重置密码',100,7,'#','','F','0','1','system:user:resetPwd','#','admin','2021-02-08 10:51:14','',NULL,''),(1007,'角色查询',101,1,'#','','F','0','1','system:role:list','#','admin','2021-02-08 10:51:14','',NULL,''),(1008,'角色新增',101,2,'#','','F','0','1','system:role:add','#','admin','2021-02-08 10:51:14','',NULL,''),(1009,'角色修改',101,3,'#','','F','0','1','system:role:edit','#','admin','2021-02-08 10:51:14','',NULL,''),(1010,'角色删除',101,4,'#','','F','0','1','system:role:remove','#','admin','2021-02-08 10:51:14','',NULL,''),(1011,'角色导出',101,5,'#','','F','0','1','system:role:export','#','admin','2021-02-08 10:51:14','',NULL,''),(1012,'菜单查询',102,1,'#','','F','0','1','system:menu:list','#','admin','2021-02-08 10:51:14','',NULL,''),(1013,'菜单新增',102,2,'#','','F','0','1','system:menu:add','#','admin','2021-02-08 10:51:14','',NULL,''),(1014,'菜单修改',102,3,'#','','F','0','1','system:menu:edit','#','admin','2021-02-08 10:51:14','',NULL,''),(1015,'菜单删除',102,4,'#','','F','0','1','system:menu:remove','#','admin','2021-02-08 10:51:14','',NULL,''),(1016,'部门查询',103,1,'#','','F','0','1','system:dept:list','#','admin','2021-02-08 10:51:14','',NULL,''),(1017,'部门新增',103,2,'#','','F','0','1','system:dept:add','#','admin','2021-02-08 10:51:14','',NULL,''),(1018,'部门修改',103,3,'#','','F','0','1','system:dept:edit','#','admin','2021-02-08 10:51:14','',NULL,''),(1019,'部门删除',103,4,'#','','F','0','1','system:dept:remove','#','admin','2021-02-08 10:51:14','',NULL,''),(1020,'岗位查询',104,1,'#','','F','0','1','system:post:list','#','admin','2021-02-08 10:51:14','',NULL,''),(1021,'岗位新增',104,2,'#','','F','0','1','system:post:add','#','admin','2021-02-08 10:51:14','',NULL,''),(1022,'岗位修改',104,3,'#','','F','0','1','system:post:edit','#','admin','2021-02-08 10:51:14','',NULL,''),(1023,'岗位删除',104,4,'#','','F','0','1','system:post:remove','#','admin','2021-02-08 10:51:14','',NULL,''),(1024,'岗位导出',104,5,'#','','F','0','1','system:post:export','#','admin','2021-02-08 10:51:14','',NULL,''),(1025,'字典查询',105,1,'#','','F','0','1','system:dict:list','#','admin','2021-02-08 10:51:14','',NULL,''),(1026,'字典新增',105,2,'#','','F','0','1','system:dict:add','#','admin','2021-02-08 10:51:14','',NULL,''),(1027,'字典修改',105,3,'#','','F','0','1','system:dict:edit','#','admin','2021-02-08 10:51:14','',NULL,''),(1028,'字典删除',105,4,'#','','F','0','1','system:dict:remove','#','admin','2021-02-08 10:51:14','',NULL,''),(1029,'字典导出',105,5,'#','','F','0','1','system:dict:export','#','admin','2021-02-08 10:51:14','',NULL,''),(1030,'参数查询',106,1,'#','','F','0','1','system:config:list','#','admin','2021-02-08 10:51:14','',NULL,''),(1031,'参数新增',106,2,'#','','F','0','1','system:config:add','#','admin','2021-02-08 10:51:14','',NULL,''),(1032,'参数修改',106,3,'#','','F','0','1','system:config:edit','#','admin','2021-02-08 10:51:14','',NULL,''),(1033,'参数删除',106,4,'#','','F','0','1','system:config:remove','#','admin','2021-02-08 10:51:14','',NULL,''),(1034,'参数导出',106,5,'#','','F','0','1','system:config:export','#','admin','2021-02-08 10:51:14','',NULL,''),(1035,'公告查询',107,1,'#','','F','0','1','system:notice:list','#','admin','2021-02-08 10:51:14','',NULL,''),(1036,'公告新增',107,2,'#','','F','0','1','system:notice:add','#','admin','2021-02-08 10:51:14','',NULL,''),(1037,'公告修改',107,3,'#','','F','0','1','system:notice:edit','#','admin','2021-02-08 10:51:14','',NULL,''),(1038,'公告删除',107,4,'#','','F','0','1','system:notice:remove','#','admin','2021-02-08 10:51:14','',NULL,''),(1039,'操作查询',500,1,'#','','F','0','1','monitor:operlog:list','#','admin','2021-02-08 10:51:14','',NULL,''),(1040,'操作删除',500,2,'#','','F','0','1','monitor:operlog:remove','#','admin','2021-02-08 10:51:14','',NULL,''),(1041,'详细信息',500,3,'#','','F','0','1','monitor:operlog:detail','#','admin','2021-02-08 10:51:14','',NULL,''),(1042,'日志导出',500,4,'#','','F','0','1','monitor:operlog:export','#','admin','2021-02-08 10:51:14','',NULL,''),(1043,'登录查询',501,1,'#','','F','0','1','monitor:logininfor:list','#','admin','2021-02-08 10:51:14','',NULL,''),(1044,'登录删除',501,2,'#','','F','0','1','monitor:logininfor:remove','#','admin','2021-02-08 10:51:14','',NULL,''),(1045,'日志导出',501,3,'#','','F','0','1','monitor:logininfor:export','#','admin','2021-02-08 10:51:14','',NULL,''),(1046,'账户解锁',501,4,'#','','F','0','1','monitor:logininfor:unlock','#','admin','2021-02-08 10:51:14','',NULL,''),(1047,'在线查询',109,1,'#','','F','0','1','monitor:online:list','#','admin','2021-02-08 10:51:14','',NULL,''),(1048,'批量强退',109,2,'#','','F','0','1','monitor:online:batchForceLogout','#','admin','2021-02-08 10:51:14','',NULL,''),(1049,'单条强退',109,3,'#','','F','0','1','monitor:online:forceLogout','#','admin','2021-02-08 10:51:14','',NULL,''),(1050,'任务查询',110,1,'#','','F','0','1','monitor:job:list','#','admin','2021-02-08 10:51:14','',NULL,''),(1051,'任务新增',110,2,'#','','F','0','1','monitor:job:add','#','admin','2021-02-08 10:51:14','',NULL,''),(1052,'任务修改',110,3,'#','','F','0','1','monitor:job:edit','#','admin','2021-02-08 10:51:14','',NULL,''),(1053,'任务删除',110,4,'#','','F','0','1','monitor:job:remove','#','admin','2021-02-08 10:51:14','',NULL,''),(1054,'状态修改',110,5,'#','','F','0','1','monitor:job:changeStatus','#','admin','2021-02-08 10:51:14','',NULL,''),(1055,'任务详细',110,6,'#','','F','0','1','monitor:job:detail','#','admin','2021-02-08 10:51:14','',NULL,''),(1056,'任务导出',110,7,'#','','F','0','1','monitor:job:export','#','admin','2021-02-08 10:51:14','',NULL,''),(1057,'生成查询',115,1,'#','','F','0','1','tool:gen:list','#','admin','2021-02-08 10:51:14','',NULL,''),(1058,'生成修改',115,2,'#','','F','0','1','tool:gen:edit','#','admin','2021-02-08 10:51:14','',NULL,''),(1059,'生成删除',115,3,'#','','F','0','1','tool:gen:remove','#','admin','2021-02-08 10:51:14','',NULL,''),(1060,'预览代码',115,4,'#','','F','0','1','tool:gen:preview','#','admin','2021-02-08 10:51:14','',NULL,''),(1061,'生成代码',115,5,'#','','F','0','1','tool:gen:code','#','admin','2021-02-08 10:51:14','',NULL,''),(1062,'项目管理',0,4,'#','menuItem','M','0','1','','fa fa-bar-chart','admin','2021-02-08 13:09:03','admin','2022-05-12 13:25:08',''),(1063,'项目列表',1062,1,'/system/project','menuItem','C','0','1','system:project:view','#','admin','2021-02-08 13:10:45','admin','2021-02-18 13:41:19',''),(1065,'项目查询',1063,1,'#','menuItem','F','0','1','system:project:list','#','admin','2021-02-18 13:38:11','admin','2021-02-18 13:38:42',''),(1066,'导出项目',1063,2,'#','menuItem','F','0','1','system:project:export','#','admin','2021-02-18 13:46:41','',NULL,''),(1067,'新增项目',1063,3,'#','menuItem','F','0','1','system:project:add','#','admin','2021-02-18 13:47:16','',NULL,''),(1068,'修改项目',1063,4,'#','menuItem','F','0','1','system:project:edit','#','admin','2021-02-18 13:47:56','',NULL,''),(1069,'删除项目',1063,5,'#','menuItem','F','0','1','system:project:remove','#','admin','2021-02-18 13:48:20','',NULL,''),(1070,'工时明细',1062,2,'/system/cost','menuItem','C','0','1','system:cost:view','#','admin','2021-02-18 14:06:34','admin','2021-03-02 14:32:25','工时菜单'),(1071,'工时查询',1070,1,'#','','F','0','1','system:cost:list','#','admin','2021-02-18 14:06:34','',NULL,''),(1072,'工时新增',1070,2,'#','','F','0','1','system:cost:add','#','admin','2021-02-18 14:06:34','',NULL,''),(1073,'工时修改',1070,3,'#','','F','0','1','system:cost:edit','#','admin','2021-02-18 14:06:34','',NULL,''),(1074,'工时删除',1070,4,'#','','F','0','1','system:cost:remove','#','admin','2021-02-18 14:06:34','',NULL,''),(1075,'工时导出',1070,5,'#','','F','0','1','system:cost:export','#','admin','2021-02-18 14:06:34','',NULL,''),(1076,'人员统计',1062,3,'/system/cost/summember','menuItem','C','0','1','system:cost:summember','#','admin','2021-02-22 14:41:32','admin','2021-03-02 14:33:17',''),(1077,'项目统计',1062,4,'/system/cost/sumproject','menuItem','C','0','1','system:cost:sumproject','#','admin','2021-03-02 14:34:10','admin','2021-03-02 14:34:39',''),(1078,'合同列表',1096,1,'/system/contract','menuItem','C','0','1','system:contract:view','#','admin','2022-03-14 07:52:38','admin','2022-03-14 08:01:11','合同菜单'),(1079,'合同查询',1078,1,'#','','F','0','1','system:contract:list','#','admin','2022-03-14 07:52:38','',NULL,''),(1080,'合同新增',1078,2,'#','','F','0','1','system:contract:add','#','admin','2022-03-14 07:52:38','',NULL,''),(1081,'合同修改',1078,3,'#','','F','0','1','system:contract:edit','#','admin','2022-03-14 07:52:38','',NULL,''),(1082,'合同删除',1078,4,'#','','F','0','1','system:contract:remove','#','admin','2022-03-14 07:52:38','',NULL,''),(1083,'合同导出',1078,5,'#','','F','0','1','system:contract:export','#','admin','2022-03-14 07:52:38','',NULL,''),(1090,'收款管理',1096,1,'/system/settlement','menuItem','C','0','1','system:settlement:view','#','admin','2022-03-14 07:53:07','admin','2022-03-14 08:01:32','合同收款菜单'),(1091,'合同收款查询',1090,1,'#','','F','0','1','system:settlement:list','#','admin','2022-03-14 07:53:07','',NULL,''),(1092,'合同收款新增',1090,2,'#','','F','0','1','system:settlement:add','#','admin','2022-03-14 07:53:07','',NULL,''),(1093,'合同收款修改',1090,3,'#','','F','0','1','system:settlement:edit','#','admin','2022-03-14 07:53:07','',NULL,''),(1094,'合同收款删除',1090,4,'#','','F','0','1','system:settlement:remove','#','admin','2022-03-14 07:53:07','',NULL,''),(1095,'合同收款导出',1090,5,'#','','F','0','1','system:settlement:export','#','admin','2022-03-14 07:53:07','',NULL,''),(1096,'合同管理',0,5,'#','menuItem','M','0','1','','fa fa-file-text-o','admin','2022-03-14 07:58:44','admin','2022-04-28 14:50:01',''),(1097,'首页',0,0,'#','menuItem','F','0','0','system:index','#','admin','2022-04-25 11:04:55','admin','2022-04-25 11:11:23',''),(1098,'统计',1097,1,'#','menuItem','F','0','1','system:index:summary','#','admin','2022-04-25 11:11:45','',NULL,''),(1099,'导出明细',1062,5,'/system/cost/exportExcel','menuItem','C','0','1','','#','admin','2022-05-12 13:25:42','admin','2022-05-12 13:26:00',''),(1100,'文件管理',1,10,'#','menuItem','F','0','1',NULL,'#','admin','2022-06-10 16:45:52','',NULL,''),(1101,'文件删除',1100,1,'#','menuItem','F','0','1','system:file:remove','#','admin','2022-06-10 16:46:06','',NULL,''),(1108,'成本导出',1099,1,'#','menuItem','F','0','1','system:cost:exportPostCost','#','admin','2022-10-19 13:21:47','',NULL,'');
UNLOCK TABLES;


CREATE TABLE `sys_notice` (
  `notice_id` int NOT NULL AUTO_INCREMENT COMMENT '公告ID',
  `notice_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告标题',
  `notice_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告类型（1通知 2公告）',
  `notice_content` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '公告内容',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '公告状态（0正常 1关闭）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`notice_id`) USING BTREE
) ENGINE=InnoDB COMMENT='通知公告表';

LOCK TABLES `sys_notice` WRITE;
UNLOCK TABLES;

CREATE TABLE `sys_oper_log` (
  `oper_id` bigint NOT NULL AUTO_INCREMENT COMMENT '日志主键',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '模块标题',
  `business_type` int DEFAULT '0' COMMENT '业务类型（0其它 1新增 2修改 3删除）',
  `method` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '方法名称',
  `request_method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '请求方式',
  `operator_type` int DEFAULT '0' COMMENT '操作类别（0其它 1后台用户 2手机端用户）',
  `oper_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '操作人员',
  `dept_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '部门名称',
  `oper_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '请求URL',
  `oper_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '主机地址',
  `oper_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '操作地点',
  `oper_param` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '请求参数',
  `json_result` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '返回参数',
  `status` int DEFAULT '0' COMMENT '操作状态（0正常 1异常）',
  `error_msg` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '错误消息',
  `oper_time` datetime DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`oper_id`) USING BTREE
) ENGINE=InnoDB COMMENT='操作日志记录';

LOCK TABLES `sys_oper_log` WRITE;
INSERT INTO `sys_oper_log` VALUES (2046,'菜单管理',2,'com.ruoyi.web.controller.system.SysMenuController.editSave()','POST',1,'admin','至存网络','/system/menu/edit','127.0.0.1','内网IP','{\"menuId\":[\"114\"],\"parentId\":[\"3\"],\"menuType\":[\"C\"],\"menuName\":[\"表单构建\"],\"url\":[\"/tool/build\"],\"target\":[\"menuItem\"],\"perms\":[\"tool:build:view\"],\"orderNum\":[\"1\"],\"icon\":[\"fa fa-wpforms\"],\"visible\":[\"1\"],\"isRefresh\":[\"1\"]}','{\r\n  \"msg\" : \"操作成功\",\r\n  \"code\" : 0\r\n}',0,NULL,'2022-10-20 14:35:18'),(2047,'菜单管理',2,'com.ruoyi.web.controller.system.SysMenuController.editSave()','POST',1,'admin','至存网络','/system/menu/edit','127.0.0.1','内网IP','{\"menuId\":[\"115\"],\"parentId\":[\"3\"],\"menuType\":[\"C\"],\"menuName\":[\"代码生成\"],\"url\":[\"/tool/gen\"],\"target\":[\"menuItem\"],\"perms\":[\"tool:gen:view\"],\"orderNum\":[\"2\"],\"icon\":[\"fa fa-code\"],\"visible\":[\"1\"],\"isRefresh\":[\"1\"]}','{\r\n  \"msg\" : \"操作成功\",\r\n  \"code\" : 0\r\n}',0,NULL,'2022-10-20 14:35:24'),(2048,'菜单管理',2,'com.ruoyi.web.controller.system.SysMenuController.editSave()','POST',1,'admin','至存网络','/system/menu/edit','127.0.0.1','内网IP','{\"menuId\":[\"116\"],\"parentId\":[\"3\"],\"menuType\":[\"C\"],\"menuName\":[\"系统接口\"],\"url\":[\"/tool/swagger\"],\"target\":[\"menuItem\"],\"perms\":[\"tool:swagger:view\"],\"orderNum\":[\"3\"],\"icon\":[\"fa fa-gg\"],\"visible\":[\"1\"],\"isRefresh\":[\"1\"]}','{\r\n  \"msg\" : \"操作成功\",\r\n  \"code\" : 0\r\n}',0,NULL,'2022-10-20 14:35:33'),(2049,'菜单管理',2,'com.ruoyi.web.controller.system.SysMenuController.editSave()','POST',1,'admin','至存网络','/system/menu/edit','127.0.0.1','内网IP','{\"menuId\":[\"3\"],\"parentId\":[\"0\"],\"menuType\":[\"M\"],\"menuName\":[\"系统工具\"],\"url\":[\"#\"],\"target\":[\"menuItem\"],\"perms\":[\"\"],\"orderNum\":[\"3\"],\"icon\":[\"fa fa-bars\"],\"visible\":[\"1\"],\"isRefresh\":[\"1\"]}','{\r\n  \"msg\" : \"操作成功\",\r\n  \"code\" : 0\r\n}',0,NULL,'2022-10-20 14:35:43');
UNLOCK TABLES;

CREATE TABLE `sys_post` (
  `post_id` bigint NOT NULL AUTO_INCREMENT COMMENT '岗位ID',
  `post_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位编码',
  `post_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位名称',
  `post_sort` int NOT NULL COMMENT '显示顺序',
  `post_cost` decimal(18,2) NOT NULL DEFAULT '0.00' COMMENT '成本sys_post',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '状态（0正常 1停用）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`post_id`) USING BTREE
) ENGINE=InnoDB COMMENT='岗位信息表';

LOCK TABLES `sys_post` WRITE;
INSERT INTO `sys_post` VALUES (1,'ceo','总经理',1,0.00,'0','admin','2021-02-08 10:51:14','admin','2022-10-19 11:22:05',''),(5,'dev','开发',2,0.00,'0','luwenping','2021-09-22 16:45:22','admin','2022-10-19 15:08:23',''),(6,'pm/pma','项目经理/助理',3,0.00,'0','luwenping','2021-09-22 16:45:33','liangxia','2021-10-27 15:14:43',''),(7,'test','测试',5,0.00,'0','luwenping','2021-09-22 16:45:42','liangxia','2021-10-27 15:04:39',''),(8,'hr','行政',4,0.00,'0','luwenping','2021-09-27 15:52:33','liangxia','2021-10-27 15:01:36',''),(9,'td','技术总监',2,0.00,'0','liangxia','2021-10-27 12:57:21','liangxia','2021-10-27 15:02:27',''),(10,'art','美工',6,0.00,'0','liangxia','2021-10-27 15:01:22','liangxia','2021-10-27 15:04:44',''),(11,'om','运营',7,0.00,'0','liangxia','2021-10-27 15:04:19','liangxia','2021-10-27 15:04:49','');
UNLOCK TABLES;

CREATE TABLE `sys_role` (
  `role_id` bigint NOT NULL AUTO_INCREMENT COMMENT '角色ID',
  `role_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名称',
  `role_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色权限字符串',
  `role_sort` int NOT NULL COMMENT '显示顺序',
  `data_scope` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限）',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色状态（0正常 1停用）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志（0代表存在 2代表删除）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`role_id`) USING BTREE
) ENGINE=InnoDB COMMENT='角色信息表';

LOCK TABLES `sys_role` WRITE;
INSERT INTO `sys_role` VALUES (1,'超级管理员','admin',1,'1','0','0','admin','2021-02-08 10:51:14','',NULL,'超级管理员'),(2,'总经理','gm',2,'1','0','0','admin','2021-02-08 10:51:14','liangxia','2022-04-26 17:02:01','总经理'),(3,'组长','leader',3,'4','0','0','admin','2021-02-23 12:32:29','admin','2022-04-25 11:14:11',''),(4,'成员','common',4,'5','0','0','admin','2021-02-23 12:33:25','admin','2021-03-02 15:12:04',''),(5,'主管','director',5,'4','0','0','admin','2021-02-23 12:52:36','admin','2022-05-20 18:04:16',''),(6,'系统管理员','system',2,'1','0','0','sunguozhen','2021-11-25 15:38:25','admin','2022-05-19 16:30:40',''),(7,'pmo','pmo',6,'1','0','0','liangxia','2022-03-17 08:20:20','admin','2022-05-19 16:32:38',''),(8,'合同管理','contract',7,'5','0','0','liangxia','2022-03-17 08:22:29','admin','2022-05-20 18:03:59',''),(9,'项目管理','pm',8,'5','0','0','liangxia','2022-03-17 08:42:35','admin','2022-05-20 18:04:11',''),(10,'收款管理','money',10,'5','0','0','admin','2022-05-19 16:34:05','admin','2022-05-20 18:04:05',NULL);
UNLOCK TABLES;

CREATE TABLE `sys_role_dept` (
  `role_id` bigint NOT NULL COMMENT '角色ID',
  `dept_id` bigint NOT NULL COMMENT '部门ID',
  PRIMARY KEY (`role_id`,`dept_id`) USING BTREE
) ENGINE=InnoDB COMMENT='角色和部门关联表';

LOCK TABLES `sys_role_dept` WRITE;
UNLOCK TABLES;

CREATE TABLE `sys_role_menu` (
  `role_id` bigint NOT NULL COMMENT '角色ID',
  `menu_id` bigint NOT NULL COMMENT '菜单ID',
  PRIMARY KEY (`role_id`,`menu_id`) USING BTREE
) ENGINE=InnoDB COMMENT='角色和菜单关联表';

LOCK TABLES `sys_role_menu` WRITE;
INSERT INTO `sys_role_menu` VALUES (2,1),(2,2),(2,100),(2,101),(2,103),(2,104),(2,109),(2,110),(2,111),(2,112),(2,113),(2,1000),(2,1001),(2,1002),(2,1003),(2,1004),(2,1005),(2,1006),(2,1007),(2,1008),(2,1009),(2,1010),(2,1011),(2,1016),(2,1017),(2,1018),(2,1019),(2,1020),(2,1021),(2,1022),(2,1023),(2,1024),(2,1047),(2,1048),(2,1049),(2,1050),(2,1051),(2,1052),(2,1053),(2,1054),(2,1055),(2,1056),(2,1062),(2,1063),(2,1065),(2,1066),(2,1067),(2,1068),(2,1069),(2,1070),(2,1071),(2,1072),(2,1073),(2,1074),(2,1075),(2,1076),(2,1077),(2,1078),(2,1079),(2,1080),(2,1081),(2,1082),(2,1083),(2,1090),(2,1091),(2,1092),(2,1093),(2,1094),(2,1095),(2,1096),(2,1097),(2,1098),(3,1062),(3,1070),(3,1071),(3,1072),(3,1073),(3,1074),(3,1075),(4,1062),(4,1070),(4,1071),(5,1062),(5,1070),(5,1071),(5,1072),(5,1073),(5,1074),(5,1075),(5,1076),(5,1077),(5,1097),(5,1098),(6,1),(6,2),(6,100),(6,101),(6,103),(6,104),(6,109),(6,110),(6,111),(6,112),(6,113),(6,1000),(6,1001),(6,1002),(6,1003),(6,1004),(6,1005),(6,1006),(6,1007),(6,1008),(6,1009),(6,1010),(6,1011),(6,1016),(6,1017),(6,1018),(6,1019),(6,1020),(6,1021),(6,1022),(6,1023),(6,1024),(6,1047),(6,1048),(6,1049),(6,1050),(6,1051),(6,1052),(6,1053),(6,1054),(6,1055),(6,1056),(7,1062),(7,1063),(7,1065),(7,1066),(7,1067),(7,1068),(7,1069),(7,1070),(7,1071),(7,1072),(7,1073),(7,1074),(7,1075),(7,1076),(7,1077),(7,1097),(7,1098),(7,1099),(8,1078),(8,1079),(8,1080),(8,1081),(8,1082),(8,1083),(8,1090),(8,1091),(8,1092),(8,1093),(8,1094),(8,1095),(8,1096),(9,1062),(9,1077),(9,1099),(10,1090),(10,1091),(10,1092),(10,1093),(10,1094),(10,1095),(10,1096);
UNLOCK TABLES;


CREATE TABLE `sys_user` (
  `user_id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `dept_id` bigint DEFAULT NULL COMMENT '部门ID',
  `login_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '登录账号',
  `user_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '用户昵称',
  `user_type` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '00' COMMENT '用户类型（00系统用户 01注册用户）',
  `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '用户邮箱',
  `phonenumber` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '手机号码',
  `sex` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '用户性别（0男 1女 2未知）',
  `avatar` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '头像路径',
  `password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '密码',
  `salt` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '盐加密',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '帐号状态（0正常 1停用）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志（0代表存在 2代表删除）',
  `login_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '最后登录IP',
  `login_date` datetime DEFAULT NULL COMMENT '最后登录时间',
  `pwd_update_date` datetime DEFAULT NULL COMMENT '密码最后更新时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  `mgt_user_id` bigint DEFAULT NULL COMMENT '负责人ID',
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE=InnoDB COMMENT='用户信息表';

LOCK TABLES `sys_user` WRITE;
INSERT INTO `sys_user` VALUES (1,100,'admin','管理员','00','ry@163.com','15888888888','1','','29c67a30398638269fe600f73a054934','111111','0','0','127.0.0.1','2022-10-19 11:46:08','2021-02-08 10:51:14','admin','2021-02-08 10:51:14','','2022-10-19 11:46:07','管理员',NULL);
UNLOCK TABLES;

CREATE TABLE `sys_user_online` (
  `sessionId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户会话id',
  `login_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '登录账号',
  `dept_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '部门名称',
  `ipaddr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '登录IP地址',
  `login_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '登录地点',
  `browser` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '浏览器类型',
  `os` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '操作系统',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '在线状态on_line在线off_line离线',
  `start_timestamp` datetime DEFAULT NULL COMMENT 'session创建时间',
  `last_access_time` datetime DEFAULT NULL COMMENT 'session最后访问时间',
  `expire_time` int DEFAULT '0' COMMENT '超时时间，单位为分钟',
  PRIMARY KEY (`sessionId`) USING BTREE
) ENGINE=InnoDB COMMENT='在线用户记录';

LOCK TABLES `sys_user_online` WRITE;
INSERT INTO `sys_user_online` VALUES ('06683f50-ff1e-44f0-b6bf-a9052f596b73','admin','至存网络','127.0.0.1','内网IP','Chrome 10','Windows 10','on_line','2022-10-20 14:27:12','2022-10-20 14:35:42',1800000);
UNLOCK TABLES;

CREATE TABLE `sys_user_post` (
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `post_id` bigint NOT NULL COMMENT '岗位ID',
  PRIMARY KEY (`user_id`,`post_id`) USING BTREE
) ENGINE=InnoDB COMMENT='用户与岗位关联表';

LOCK TABLES `sys_user_post` WRITE;
INSERT INTO `sys_user_post` VALUES (1,1);
UNLOCK TABLES;

CREATE TABLE `sys_user_role` (
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `role_id` bigint NOT NULL COMMENT '角色ID',
  PRIMARY KEY (`user_id`,`role_id`) USING BTREE
) ENGINE=InnoDB COMMENT='用户和角色关联表';

LOCK TABLES `sys_user_role` WRITE;
INSERT INTO `sys_user_role` VALUES (1,1);
UNLOCK TABLES;

CREATE TABLE `tbl_contract` (
  `id` varchar(32) NOT NULL COMMENT 'ID',
  `name` varchar(100) NOT NULL COMMENT '合同名称',
  `leader_id` bigint DEFAULT NULL COMMENT '负责人id',
  `leader` varchar(20) DEFAULT NULL COMMENT '负责人',
  `buyers` varchar(100) NOT NULL COMMENT '甲方',
  `sellers` varchar(100) NOT NULL COMMENT '乙方',
  `sign_date` datetime NOT NULL COMMENT '签约日期',
  `start_date` datetime NOT NULL COMMENT '起始日期',
  `end_date` datetime NOT NULL COMMENT '结束日期',
  `amount` decimal(18,2) NOT NULL COMMENT '金额',
  `pay_mode` char(1) NOT NULL COMMENT '付款方式',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  `pay_status` char(1) DEFAULT '1' COMMENT '收款状态',
  `status` char(1) DEFAULT NULL COMMENT '状态',
  `del_flag` char(1) DEFAULT '0' COMMENT '删除标志（0代表存在 2代表删除）',
  `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT='合同表';

LOCK TABLES `tbl_contract` WRITE;
UNLOCK TABLES;

CREATE TABLE `tbl_contract_settlement` (
  `id` varchar(32) NOT NULL COMMENT 'ID',
  `contract_id` varchar(32) NOT NULL COMMENT '合同id',
  `settle_type` char(1) NOT NULL COMMENT '计划收款or确认收款',
  `settle_date` datetime NOT NULL COMMENT '收款日期',
  `amount` decimal(18,2) NOT NULL COMMENT '金额',
  `pay_mode` char(1) NOT NULL COMMENT '付款方式',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  `warn_flag` char(1) DEFAULT NULL COMMENT '提示标记',
  `del_flag` char(1) DEFAULT '0' COMMENT '删除标志（0代表存在 2代表删除）',
  `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT='合同收款表';

LOCK TABLES `tbl_contract_settlement` WRITE;
UNLOCK TABLES;


CREATE TABLE `tbl_project` (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
  `auto_id` bigint(8) unsigned zerofill NOT NULL AUTO_INCREMENT COMMENT '自动编号',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `leader_id` bigint DEFAULT NULL COMMENT '负责人id',
  `leader` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '负责人',
  `contract_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '合同id',
  `contract_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '合同名称',
  `buyers` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '甲方',
  `sellers` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '乙方',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  `start_date` datetime DEFAULT NULL COMMENT '起始日期',
  `end_date` datetime DEFAULT NULL COMMENT '结束日期',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态（0正常 1停用）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志（0代表存在 2代表删除）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `auto_id_UNIQUE` (`auto_id`)
) ENGINE=InnoDB COMMENT='项目表';

LOCK TABLES `tbl_project` WRITE;
UNLOCK TABLES;

CREATE TABLE `tbl_project_cost` (
  `id` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
  `group_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组ID',
  `project_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
  `project_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '项目名称',
  `user` bigint NOT NULL COMMENT '用户ID',
  `user_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户名',
  `start_date` date NOT NULL COMMENT '起始日期',
  `end_date` date NOT NULL COMMENT '结束日期',
  `cost_day` decimal(5,1) NOT NULL COMMENT '人日',
  `remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='工时表';


LOCK TABLES `tbl_project_cost` WRITE;
UNLOCK TABLES;

CREATE TABLE `tbl_upload_file` (
  `id` varchar(32) NOT NULL COMMENT 'ID',
  `rel_type` varchar(20) NOT NULL COMMENT '关联类型',
  `rel_id` varchar(32) NOT NULL COMMENT '关联表ID',
  `file_name` varchar(200) NOT NULL COMMENT '文件名',
  `file_path` varchar(200) NOT NULL COMMENT '文件路径（包含保存文件名）',
  `file_ext` varchar(20) NOT NULL COMMENT '后缀名',
  `del_flag` char(1) DEFAULT '0' COMMENT '删除标志（0代表存在 2代表删除）',
  `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT='文件关联表';


LOCK TABLES `tbl_upload_file` WRITE;
UNLOCK TABLES;


CREATE TABLE `tbl_user_project` (
  `user_id` bigint NOT NULL,
  `project_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB COMMENT='人员项目管理表';


LOCK TABLES `tbl_user_project` WRITE;
UNLOCK TABLES;


CREATE TABLE `tbl_user_updatetime` (
  `user_id` bigint NOT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE=InnoDB;

LOCK TABLES `tbl_user_updatetime` WRITE;
UNLOCK TABLES;
