import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { AdDeliveryPlan } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-05-20 22:09
 */
interface AdDeliveryPlanCU extends ConditionUtil<AdDeliveryPlanCU>{
    ID:FieldUtil<AdDeliveryPlanCU>;
    NAME:FieldUtil<AdDeliveryPlanCU>;
    DESCRIPTION:FieldUtil<AdDeliveryPlanCU>;
    AD_INFO_ID:FieldUtil<AdDeliveryPlanCU>;
    AD_POSITION_ID:FieldUtil<AdDeliveryPlanCU>;
    AD_MATERIAL_ID:FieldUtil<AdDeliveryPlanCU>;
    AD_STYLE_ID:FieldUtil<AdDeliveryPlanCU>;
    CHARGE_TYPE:FieldUtil<AdDeliveryPlanCU>;
    PRICE:FieldUtil<AdDeliveryPlanCU>;
    START_TIME:FieldUtil<AdDeliveryPlanCU>;
    END_TIME:FieldUtil<AdDeliveryPlanCU>;
    DISPLAY_TIMES:FieldUtil<AdDeliveryPlanCU>;
    DISPLAY_TIMES_PER_USER:FieldUtil<AdDeliveryPlanCU>;
    STATUS:FieldUtil<AdDeliveryPlanCU>;
    CREATE_TIME:FieldUtil<AdDeliveryPlanCU>;
    CREATOR:FieldUtil<AdDeliveryPlanCU>;
    UPDATE_TIME:FieldUtil<AdDeliveryPlanCU>;
    UPDATOR:FieldUtil<AdDeliveryPlanCU>;
}

class AdDeliveryPlanCUImpl extends ConditionUtilImpl<AdDeliveryPlanCUImpl> implements AdDeliveryPlanCU{ 
    newInstance(): AdDeliveryPlanCUImpl {
        return new AdDeliveryPlanCUImpl();
    } 
    get ID(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('id','id','广告投递id', this);
    }
    get NAME(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('name','name','名称', this);
    }
    get DESCRIPTION(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('description','description','描述', this);
    }
    get AD_INFO_ID(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('ad_info_id','adInfoId','广告id', this);
    }
    get AD_POSITION_ID(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('ad_position_id','adPositionId','广告位id', this);
    }
    get AD_MATERIAL_ID(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('ad_material_id','adMaterialId','广告素材id', this);
    }
    get AD_STYLE_ID(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('ad_style_id','adStyleId','广告样式id', this);
    }
    get CHARGE_TYPE(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('charge_type','chargeType','收费类型：0，CPD；1，CPA；2，CPM', this);
    }
    get PRICE(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('price','price','价格:CPD,投放时间段的展示收费价；CPM每千次展示的收费；CPA每次成交的收费', this);
    }
    get START_TIME(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('start_time','startTime','投放起始时间', this);
    }
    get END_TIME(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('end_time','endTime','投放结束时间', this);
    }
    get DISPLAY_TIMES(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('display_times','displayTimes','展示次数上限', this);
    }
    get DISPLAY_TIMES_PER_USER(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('display_times_per_user','displayTimesPerUser','单用户展示次数上限', this);
    }
    get STATUS(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('status','status','状态：0，启用，1删除', this);
    }
    get CREATE_TIME(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('create_time','createTime','', this);
    }
    get CREATOR(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('creator','creator','', this);
    }
    get UPDATE_TIME(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('update_time','updateTime','', this);
    }
    get UPDATOR(): FieldUtil<AdDeliveryPlanCU>{  
        return new FieldUtil('updator','updator','', this);
    }
}

@Singleton 
class AdDeliveryPlanMU extends TableUtilImpl<AdDeliveryPlanCU,AdDeliveryPlan>{ 
    tableName  = 'ad_delivery_plan';
    tableFields  = ['id','name','description','ad_info_id','ad_position_id','ad_material_id','ad_style_id','charge_type','price','start_time','end_time','display_times','display_times_per_user','status','create_time','creator','update_time','updator'];
    modelFields  = ['id','name','description','adInfoId','adPositionId','adMaterialId','adStyleId','chargeType','price','startTime','endTime','displayTimes','displayTimesPerUser','status','createTime','creator','updateTime','updator'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): AdDeliveryPlanCU {
        return new AdDeliveryPlanCUImpl();
    }   

    static get ID(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('id','id','广告投递id', new AdDeliveryPlanCUImpl());
    }
    static get NAME(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('name','name','名称', new AdDeliveryPlanCUImpl());
    }
    static get DESCRIPTION(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('description','description','描述', new AdDeliveryPlanCUImpl());
    }
    static get AD_INFO_ID(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('ad_info_id','adInfoId','广告id', new AdDeliveryPlanCUImpl());
    }
    static get AD_POSITION_ID(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('ad_position_id','adPositionId','广告位id', new AdDeliveryPlanCUImpl());
    }
    static get AD_MATERIAL_ID(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('ad_material_id','adMaterialId','广告素材id', new AdDeliveryPlanCUImpl());
    }
    static get AD_STYLE_ID(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('ad_style_id','adStyleId','广告样式id', new AdDeliveryPlanCUImpl());
    }
    static get CHARGE_TYPE(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('charge_type','chargeType','收费类型：0，CPD；1，CPA；2，CPM', new AdDeliveryPlanCUImpl());
    }
    static get PRICE(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('price','price','价格:CPD,投放时间段的展示收费价；CPM每千次展示的收费；CPA每次成交的收费', new AdDeliveryPlanCUImpl());
    }
    static get START_TIME(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('start_time','startTime','投放起始时间', new AdDeliveryPlanCUImpl());
    }
    static get END_TIME(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('end_time','endTime','投放结束时间', new AdDeliveryPlanCUImpl());
    }
    static get DISPLAY_TIMES(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('display_times','displayTimes','展示次数上限', new AdDeliveryPlanCUImpl());
    }
    static get DISPLAY_TIMES_PER_USER(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('display_times_per_user','displayTimesPerUser','单用户展示次数上限', new AdDeliveryPlanCUImpl());
    }
    static get STATUS(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('status','status','状态：0，启用，1删除', new AdDeliveryPlanCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('create_time','createTime','', new AdDeliveryPlanCUImpl());
    }
    static get CREATOR(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('creator','creator','', new AdDeliveryPlanCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('update_time','updateTime','', new AdDeliveryPlanCUImpl());
    }
    static get UPDATOR(): FieldUtil<AdDeliveryPlanCU>{ 
        return new FieldUtil('updator','updator','', new AdDeliveryPlanCUImpl());
    }

    get ID(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.ID;
    }
    get NAME(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.NAME;
    }
    get DESCRIPTION(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.DESCRIPTION;
    }
    get AD_INFO_ID(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.AD_INFO_ID;
    }
    get AD_POSITION_ID(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.AD_POSITION_ID;
    }
    get AD_MATERIAL_ID(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.AD_MATERIAL_ID;
    }
    get AD_STYLE_ID(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.AD_STYLE_ID;
    }
    get CHARGE_TYPE(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.CHARGE_TYPE;
    }
    get PRICE(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.PRICE;
    }
    get START_TIME(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.START_TIME;
    }
    get END_TIME(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.END_TIME;
    }
    get DISPLAY_TIMES(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.DISPLAY_TIMES;
    }
    get DISPLAY_TIMES_PER_USER(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.DISPLAY_TIMES_PER_USER;
    }
    get STATUS(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.STATUS;
    }
    get CREATE_TIME(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.CREATE_TIME;
    }
    get CREATOR(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.CREATOR;
    }
    get UPDATE_TIME(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.UPDATE_TIME;
    }
    get UPDATOR(): FieldUtil<AdDeliveryPlanCU>{ 
        return AdDeliveryPlanMU.UPDATOR;
    }
}
export {AdDeliveryPlanMU, AdDeliveryPlanCU}
