create table hrsa_statreportlogs_detail
(
  id number primary key ,
  create_time date,
  update_time date,
  creator number,
  delete_type int default 0,
  tenant_key varchar(10),
  uuid varchar(36) not null,
  mainid varchar(36) not null,
  dataid varchar(50) not null,
  belongdataid varchar(50) not null,
  tablename varchar(200) not null,
  tablenamelabelid varchar(50) default '-1' not null,
  tablenamedesc varchar(50) not null,
  fieldname varchar(200) not null,
  fieldnamelabelid varchar(50) default '-1' not null,
  newvalue clob not null,
  oldvalue clob not null,
  newrealvalue clob not null,
  oldrealvalue clob not null,
  fielddesc varchar(200) not null,
  showorder int not null,
  isdetail int default 0 not null
);
/

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 number primary key ,
  create_time date,
  update_time date,
  creator number,
  delete_type int default 0,
  tenant_key varchar(10),
  uuid varchar(36) not null,
  log_date date not null,
  device varchar(500) not null,
  log_operator number not null,
  operatorname varchar(100),
  targetid number default '-1' not null,
  targetname clob not null,
  modulename varchar(100) not null,
  functionname varchar(100) not null,
  interfacename varchar(100) not null,
  requesturl varchar(200) not null,
  requesturi varchar(200) not null,
  operatetype varchar(50) not null,
  operatetypename varchar(100) not null,
  operatedesc varchar(3000) not null,
  params clob not null,
  belongmainid varchar(36) not null,
  clientip varchar(50) not null,
  groupid varchar(50) not null,
  groupnamelabel varchar(1000) not null,
  redoservice varchar(200) not null,
  redocontext clob not null,
  cancelservice varchar(200) not null,
  cancelcontext clob not null,
  totalruntime number default '0' not null,
  mainruntime number default '0' not null,
  log_result varchar(100) not null,
  fromterminal varchar(100) not null,
  resultdesc clob not null,
  old_content varchar(3000) not null,
  link_type varchar(20) not null,
  link_id number default '0' not null,
  old_link_id number default '0' not null
);
/

create index idx_tenan_0ad78df3 on hrsa_statreportlogs(tenant_key);
/

create index idx_del_u_7c93862b on hrsa_statreportlogs(delete_type,update_time);
/