create table hrsa_statreportlogs_detail ( id bigint primary key comment 'ID' , create_time datetime comment '创建时间' , update_time datetime comment '修改时间' , creator bigint comment '创建人id' , delete_type int default 0 comment '是否删除' , tenant_key varchar(10) comment '租户KEY' , uuid varchar(36) not null comment '日志UUID' , mainid varchar(36) not null comment '主表id' , dataid varchar(50) not null comment '数据id' , belongdataid varchar(50) not null comment '主表数据id' , tablename varchar(200) not null comment '表名' , tablenamelabelid varchar(50) default '-1' not null comment '表名labelid' , tablenamedesc varchar(50) not null comment '对应数据库的表' , fieldname varchar(200) not null comment '字段名' , fieldnamelabelid varchar(50) default '-1' not null comment '字段名labelid' , newvalue text not null comment '更新后的值' , oldvalue text not null comment '更新前的值' , newrealvalue text not null comment '更新后的显示值' , oldrealvalue text not null comment '更新前的显示值' , fielddesc varchar(200) not null comment '字段名' , showorder int(11) not null comment '字段名' , isdetail int(11) default 0 not null comment '是否明细字段' ) ; create index idx_tenant_4fd0f4bc on hrsa_statreportlogs_detail(tenant_key) ; create index idx_del_up_e798e3ef on hrsa_statreportlogs_detail(delete_type,update_time) ; create table hrsa_statreportlogs ( id bigint primary key comment 'ID' , create_time datetime comment '创建时间' , update_time datetime comment '修改时间' , creator bigint comment '创建人id' , delete_type int default 0 comment '是否删除' , tenant_key varchar(10) comment '租户KEY' , uuid varchar(36) not null comment '日志UUID' , log_date datetime not null comment '记录时间' , device varchar(500) not null comment '终端信息' , log_operator bigint not null comment '操作者' , operatorname varchar(100) comment '操作人姓名' , targetid bigint default '-1' not null comment '操作目标id' , targetname text not null comment '操作目标名称' , modulename varchar(100) not null comment '模块' , functionname varchar(100) not null comment '服务(方法)' , interfacename varchar(100) not null comment '访问接口名' , requesturl varchar(200) not null comment '请求全路径' , requesturi varchar(200) not null comment '请求地址' , operatetype varchar(50) not null comment '操作类型' , operatetypename varchar(100) not null comment '操作类型名称' , operatedesc varchar(3000) not null comment '操作详细说明' , params text not null comment '涉及的相关参数' , belongmainid varchar(36) not null comment '所属主表uuid' , clientip varchar(50) not null comment '操作IP' , groupid varchar(50) not null comment '分组' , groupnamelabel varchar(1000) not null comment '分组标题' , redoservice varchar(200) not null comment '重做业务接口' , redocontext text not null comment '重做参数' , cancelservice varchar(200) not null comment '撤销业务接口' , cancelcontext text not null comment '撤销参数' , totalruntime bigint default '0' not null comment '总运行时长' , mainruntime bigint default '0' not null comment '主方法运行时长' , log_result varchar(100) not null comment '日志结果' , fromterminal varchar(100) not null comment '来自pc web' , resultdesc text not null comment '运行结果描述' , old_content varchar(3000) not null comment '原先内容' , link_type varchar(20) not null comment '链接类型' , link_id bigint default '0' not null comment '链接id' , old_link_id bigint default '0' not null comment '原先链接id' ) ; create index idx_tenan_0ad78df3 on hrsa_statreportlogs(tenant_key) ; create index idx_del_u_7c93862b on hrsa_statreportlogs(delete_type,update_time) ;