
-- @AutoRun
-- drop table tl_coupon;



CREATE TABLE tl_coupon (
    object_id numeric(12) NOT NULL ,
    object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
    object_created_date timestamp DEFAULT NOW() NOT NULL
    ,
    coupon_code varchar(100) NOT NULL,
    percentage_off numeric(20,5) NULL,
    duration_in_months numeric(12) NULL,
    coupon_duration varchar(200) NULL,
    redeem_by timestamp NULL,
    max_redemptions numeric(12) NULL,
    times_redeemed numeric(12) NULL
    );



ALTER TABLE tl_coupon ADD    
    CONSTRAINT pk_tl_coupon PRIMARY KEY 
    (
        object_id
    ) ;
    
    
    