
-- DROP TABLE tl_message_template;




CREATE TABLE tl_message_template (
    object_id number(12) NOT NULL ,
    object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
    object_created_date date DEFAULT SYSDATE NOT NULL
    ,
    message_id number(12) NULL,
    template_name varchar2(200) NOT NULL,
    subject varchar2(200) NOT NULL,
    application_status varchar2(200) NULL,
    delay_hrs number(12) NULL,
    delay_min number(12) NULL,
    variance number(12) NULL,
    business_hours_only char(1) NULL,
    message_content clob NOT NULL,
    template_type varchar2(200) NOT NULL,
    related_to_job char(1) NULL,
    is_system_generated char(1) NULL,
    hiring_team_id number(12)  NULL
    );



ALTER TABLE tl_message_template ADD    
    CONSTRAINT PK_tl_message_template PRIMARY KEY 
    (
        object_id
    ) ;
    
    
    
    CREATE INDEX idx_tl_message_template_hiring_team_id 
    ON tl_message_template (hiring_team_id);
