import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { Ad_delivery_plan } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-04-19 14:33
 */
interface Ad_delivery_planCU extends ConditionUtil<Ad_delivery_planCU>{
    ID:FieldUtil<Ad_delivery_planCU>;
    NAME:FieldUtil<Ad_delivery_planCU>;
    DESCRIPTION:FieldUtil<Ad_delivery_planCU>;
    AD_INFO_ID:FieldUtil<Ad_delivery_planCU>;
    CHARGE_TYPE:FieldUtil<Ad_delivery_planCU>;
    PRICE:FieldUtil<Ad_delivery_planCU>;
    START_TIME:FieldUtil<Ad_delivery_planCU>;
    END_TIME:FieldUtil<Ad_delivery_planCU>;
    DISPALY_TIMES:FieldUtil<Ad_delivery_planCU>;
    DISPLAY_TIMES_PER_USER:FieldUtil<Ad_delivery_planCU>;
    STATUS:FieldUtil<Ad_delivery_planCU>;
    CREATE_TIME:FieldUtil<Ad_delivery_planCU>;
    CREATOR:FieldUtil<Ad_delivery_planCU>;
    UPDATE_TIME:FieldUtil<Ad_delivery_planCU>;
    UPDATOR:FieldUtil<Ad_delivery_planCU>;
}

class Ad_delivery_planCUImpl extends ConditionUtilImpl<Ad_delivery_planCUImpl> implements Ad_delivery_planCU{ 
    newInstance(): Ad_delivery_planCUImpl {
        return new Ad_delivery_planCUImpl();
    } 
    get ID(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('ID','id','广告投递id', this);
    }
    get NAME(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('NAME','name','名称', this);
    }
    get DESCRIPTION(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('DESCRIPTION','description','描述', this);
    }
    get AD_INFO_ID(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('AD_INFO_ID','adInfoId','广告id', this);
    }
    get CHARGE_TYPE(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('CHARGE_TYPE','chargeType','收费类型：0，CPD；1，CPA；2，CPM', this);
    }
    get PRICE(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('PRICE','price','价格', this);
    }
    get START_TIME(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('START_TIME','startTime','投放起始时间', this);
    }
    get END_TIME(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('END_TIME','endTime','投放结束时间', this);
    }
    get DISPALY_TIMES(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('DISPALY_TIMES','dispalyTimes','展示次数上限', this);
    }
    get DISPLAY_TIMES_PER_USER(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('DISPLAY_TIMES_PER_USER','displayTimesPerUser','单用户展示次数上限', this);
    }
    get STATUS(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('STATUS','status','状态：0，启用，1删除', this);
    }
    get CREATE_TIME(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('CREATE_TIME','createTime','', this);
    }
    get CREATOR(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('CREATOR','creator','', this);
    }
    get UPDATE_TIME(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','', this);
    }
    get UPDATOR(): FieldUtil<Ad_delivery_planCU>{  
        return new FieldUtil('UPDATOR','updator','', this);
    }
}

@Singleton 
class Ad_delivery_planMU extends TableUtilImpl<Ad_delivery_planCU,Ad_delivery_plan>{ 
    tableName  = 'ad_delivery_plan';
    tableFields  = ['id','name','description','ad_info_id','charge_type','price','start_time','end_time','dispaly_times','display_times_per_user','status','create_time','creator','update_time','updator'];
    modelFields  = ['id','name','description','adInfoId','chargeType','price','startTime','endTime','dispalyTimes','displayTimesPerUser','status','createTime','creator','updateTime','updator'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): Ad_delivery_planCU {
        return new Ad_delivery_planCUImpl();
    }   

    static get ID(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('ID','id','广告投递id', new Ad_delivery_planCUImpl());
    }
    static get NAME(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('NAME','name','名称', new Ad_delivery_planCUImpl());
    }
    static get DESCRIPTION(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('DESCRIPTION','description','描述', new Ad_delivery_planCUImpl());
    }
    static get AD_INFO_ID(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('AD_INFO_ID','adInfoId','广告id', new Ad_delivery_planCUImpl());
    }
    static get CHARGE_TYPE(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('CHARGE_TYPE','chargeType','收费类型：0，CPD；1，CPA；2，CPM', new Ad_delivery_planCUImpl());
    }
    static get PRICE(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('PRICE','price','价格', new Ad_delivery_planCUImpl());
    }
    static get START_TIME(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('START_TIME','startTime','投放起始时间', new Ad_delivery_planCUImpl());
    }
    static get END_TIME(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('END_TIME','endTime','投放结束时间', new Ad_delivery_planCUImpl());
    }
    static get DISPALY_TIMES(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('DISPALY_TIMES','dispalyTimes','展示次数上限', new Ad_delivery_planCUImpl());
    }
    static get DISPLAY_TIMES_PER_USER(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('DISPLAY_TIMES_PER_USER','displayTimesPerUser','单用户展示次数上限', new Ad_delivery_planCUImpl());
    }
    static get STATUS(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('STATUS','status','状态：0，启用，1删除', new Ad_delivery_planCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','', new Ad_delivery_planCUImpl());
    }
    static get CREATOR(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('CREATOR','creator','', new Ad_delivery_planCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','', new Ad_delivery_planCUImpl());
    }
    static get UPDATOR(): FieldUtil<Ad_delivery_planCU>{ 
        return new FieldUtil('UPDATOR','updator','', new Ad_delivery_planCUImpl());
    }

    get ID(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.ID;
    }
    get NAME(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.NAME;
    }
    get DESCRIPTION(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.DESCRIPTION;
    }
    get AD_INFO_ID(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.AD_INFO_ID;
    }
    get CHARGE_TYPE(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.CHARGE_TYPE;
    }
    get PRICE(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.PRICE;
    }
    get START_TIME(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.START_TIME;
    }
    get END_TIME(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.END_TIME;
    }
    get DISPALY_TIMES(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.DISPALY_TIMES;
    }
    get DISPLAY_TIMES_PER_USER(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.DISPLAY_TIMES_PER_USER;
    }
    get STATUS(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.STATUS;
    }
    get CREATE_TIME(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.CREATE_TIME;
    }
    get CREATOR(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.CREATOR;
    }
    get UPDATE_TIME(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.UPDATE_TIME;
    }
    get UPDATOR(): FieldUtil<Ad_delivery_planCU>{ 
        return Ad_delivery_planMU.UPDATOR;
    }
}
export {Ad_delivery_planMU, Ad_delivery_planCU}
