
-- @AutoRun
-- drop table tl_client;



CREATE TABLE tl_client (
    object_id numeric(12) NOT NULL ,
    object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
    object_created_date timestamp DEFAULT NOW() NOT NULL
    ,
    client_name varchar(100) NOT NULL,
    client_logo bytea NULL,
    email varchar(100) NULL,
    contact_name varchar(100) NULL,
    contact_surname varchar(100) NULL,
    phone varchar(30) NULL,
    state varchar(200) NULL,
    country varchar(200) NULL,
    post_code varchar(10) NULL,
    city varchar(100) NULL,
    time_zone varchar(200) NULL,
    hiring_team_id numeric(12)  NOT NULL,
    company_id numeric(12)  NULL
    );



ALTER TABLE tl_client ADD    
    CONSTRAINT pk_tl_client PRIMARY KEY 
    (
        object_id
    ) ;
    
    
    
    CREATE INDEX idx_tl_client_hiring_team_id 
    ON tl_client (hiring_team_id);

    CREATE INDEX idx_tl_client_company_id 
    ON tl_client (company_id);
