create table hrsa_add_up_deduction_request
(
  id number primary key ,
  create_time date,
  update_time date,
  creator number,
  delete_type int default 0,
  tenant_key varchar2(10),
  request_id number not null,
  request_status number default 1 not null,
  tax_year_month date not null,
  outer_request_id varchar2(50) not null,
  tax_agent_id number not null
);
/

alter table hrsa_add_up_deduction_request add lock_version int;
/

alter table hrsa_add_up_deduction_request modify lock_version default 0;
/

create table hrsa_add_up_deduction_req_fail
(
  id number primary key ,
  create_time date,
  update_time date,
  creator number,
  delete_type int default 0,
  tenant_key varchar2(10),
  request_id number not null,
  employee_id number not null,
  employee_type int not null,
  tax_agent_id number not null,
  reason varchar2(255) not null,
  tax_year_month date not null,
  outer_request_id varchar2(50) not null
);
/

