ALTER TABLE hrsa_tax_agent_emp ADD employee_type number 
/

ALTER TABLE hrsa_salary_archive ADD employee_type number 
/

ALTER TABLE hrsa_tax_agent_emp_change ADD employee_type number 
/

ALTER TABLE hrsa_salary_acct_emp ADD employee_type number 
/

ALTER TABLE hrsa_salary_send_info ADD employee_type number 
/


CREATE TABLE hrsa_external_employee
(
    id               NUMBER(38,0) primary key NOT NULL,
    username         varchar2(200) DEFAULT '',
    department_name  varchar2(200) DEFAULT '',
    department_id    NUMBER(38,0) DEFAULT 0,
    subcompany_name  varchar2(200) DEFAULT '',
    subcompany_id    NUMBER(38,0) DEFAULT 0,
    jobtitle_name    varchar2(200) DEFAULT '',
    jobtitle_id      NUMBER(38,0) DEFAULT 0,
    companystartdate varchar2(200) DEFAULT '',
    mobile           varchar2(20) DEFAULT '',
    status           varchar2(10) DEFAULT '',
    workcode         varchar2(200) DEFAULT '',
    sex              varchar2(10) DEFAULT '',
    email            varchar2(200) DEFAULT '',
    telephone        varchar2(200) DEFAULT '',
    jobcall          varchar2(200) DEFAULT '',
    birthday         varchar2(200) DEFAULT '',
    id_no            varchar2(200) DEFAULT '',
    bank_card_num    varchar2(200) DEFAULT '',
    bank_name        varchar2(200) DEFAULT '',
    delete_type      number DEFAULT 0,
    creator          NUMBER(38,0) DEFAULT 0,
    modifier         NUMBER(38,0) DEFAULT 0,
    create_time      DATE   DEFAULT sysdate,
    update_time      DATE   DEFAULT sysdate,
    tenant_key       varchar2(200) DEFAULT ''
)
/

CREATE TABLE hrsa_salary_sob_ext_range
(
    id            NUMBER(38,0) primary key NOT NULL,
    salary_sob_id NUMBER(38,0) DEFAULT 0,
    target_type   NUMBER(38,0) DEFAULT 0,
    target_id     NUMBER(38,0) DEFAULT 0,
    creator       NUMBER(38,0) DEFAULT 0,
    create_time   DATE   DEFAULT sysdate,
    update_time   DATE   DEFAULT sysdate,
    delete_type   number DEFAULT 0,
    tenant_key    varchar2(200) DEFAULT ''
)
/

CREATE TABLE hrsa_tax_agent_ext_range
(
    id           NUMBER(38,0) primary key NOT NULL,
    tax_agent_id NUMBER(38,0) DEFAULT 0,
    target_type  NUMBER(38,0) DEFAULT 0,
    target_id    NUMBER(38,0) DEFAULT 0,
    creator      NUMBER(38,0) DEFAULT 0,
    create_time  DATE   DEFAULT sysdate,
    update_time  DATE   DEFAULT sysdate,
    delete_type  number DEFAULT 0,
    tenant_key   varchar2(200) DEFAULT ''
)
/