ALTER TABLE hrsa_tax_agent_emp ADD employee_type int  NULL
GO

ALTER TABLE hrsa_salary_archive ADD employee_type int  NULL
GO

ALTER TABLE hrsa_tax_agent_emp_change ADD employee_type int  NULL
GO

ALTER TABLE hrsa_salary_acct_emp ADD employee_type int  NULL
GO

ALTER TABLE hrsa_salary_send_info ADD employee_type int  NULL
GO




CREATE TABLE hrsa_external_employee
(
    id               bigint NOT NULL,
    username         varchar(255) ,
    department_name  varchar(255)  ,
    department_id    bigint  ,
    subcompany_name  varchar(255) ,
    subcompany_id    bigint  ,
    jobtitle_name    varchar(255)  ,
    jobtitle_id      bigint  ,
    companystartdate varchar(255) ,
    mobile           varchar(255) ,
    status           varchar(255)  ,
    workcode         varchar(255)  ,
    sex              varchar(255) ,
    email            varchar(255)  ,
    telephone        varchar(255) ,
    jobcall          varchar(255)  ,
    birthday         varchar(255) ,
    id_no            varchar(255) ,
    bank_card_num    varchar(255) ,
    bank_name        varchar(255)  ,
    delete_type      int  ,
    creator          bigint ,
    modifier         bigint  ,
    create_time      datetime  ,
    update_time      datetime  ,
    tenant_key       varchar(255)  ,
    PRIMARY KEY (id)
)
GO

CREATE TABLE hrsa_salary_sob_ext_range
(
    id            bigint NOT NULL ,
    salary_sob_id bigint  ,
    target_type   tinyint  ,
    target_id     bigint  ,
    creator       bigint  ,
    create_time   datetime   ,
    update_time   datetime   ,
    delete_type   int  ,
    tenant_key    varchar(10)  ,
    PRIMARY KEY (id) 
)
GO

CREATE TABLE hrsa_tax_agent_ext_range
(
    id           bigint NOT NULL ,
    tax_agent_id bigint  ,
    target_type  tinyint ,
    target_id    bigint ,
    creator      bigint ,
    create_time  datetime,
    update_time  datetime,
    delete_type  int ,
    tenant_key   varchar(10) ,
    PRIMARY KEY (id) 
)
GO