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_position_material } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-04-15 11:42
 */
interface Ad_delivery_plan_position_materialCU extends ConditionUtil<Ad_delivery_plan_position_materialCU>{
    AD_DELIVERY_PLAN_ID:FieldUtil<Ad_delivery_plan_position_materialCU>;
    AD_POSITION_ID:FieldUtil<Ad_delivery_plan_position_materialCU>;
    AD_MATERIAL_ID:FieldUtil<Ad_delivery_plan_position_materialCU>;
    AD_STYLE_ID:FieldUtil<Ad_delivery_plan_position_materialCU>;
    DEL_FLAG:FieldUtil<Ad_delivery_plan_position_materialCU>;
}

class Ad_delivery_plan_position_materialCUImpl extends ConditionUtilImpl<Ad_delivery_plan_position_materialCUImpl> implements Ad_delivery_plan_position_materialCU{ 
    newInstance(): Ad_delivery_plan_position_materialCUImpl {
        return new Ad_delivery_plan_position_materialCUImpl();
    } 
    get AD_DELIVERY_PLAN_ID(): FieldUtil<Ad_delivery_plan_position_materialCU>{  
        return new FieldUtil('AD_DELIVERY_PLAN_ID','adDeliveryPlanId','投放计划id', this);
    }
    get AD_POSITION_ID(): FieldUtil<Ad_delivery_plan_position_materialCU>{  
        return new FieldUtil('AD_POSITION_ID','adPositionId','广告位id', this);
    }
    get AD_MATERIAL_ID(): FieldUtil<Ad_delivery_plan_position_materialCU>{  
        return new FieldUtil('AD_MATERIAL_ID','adMaterialId','素材id', this);
    }
    get AD_STYLE_ID(): FieldUtil<Ad_delivery_plan_position_materialCU>{  
        return new FieldUtil('AD_STYLE_ID','adStyleId','样式id', this);
    }
    get DEL_FLAG(): FieldUtil<Ad_delivery_plan_position_materialCU>{  
        return new FieldUtil('DEL_FLAG','delFlag','是否删除：0，否；1，是', this);
    }
}

@Singleton 
class Ad_delivery_plan_position_materialMU extends TableUtilImpl<Ad_delivery_plan_position_materialCU,Ad_delivery_plan_position_material>{ 
    tableName  = 'ad_delivery_plan_position_material';
    tableFields  = ['ad_delivery_plan_id','ad_position_id','ad_material_id','ad_style_id','del_flag'];
    modelFields  = ['adDeliveryPlanId','adPositionId','adMaterialId','adStyleId','delFlag'];
    modelIdFields  = ['adDeliveryPlanId','adPositionId','adMaterialId'];
    tableIdFields  = ['ad_delivery_plan_id','ad_position_id','ad_material_id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): Ad_delivery_plan_position_materialCU {
        return new Ad_delivery_plan_position_materialCUImpl();
    }   

    static get AD_DELIVERY_PLAN_ID(): FieldUtil<Ad_delivery_plan_position_materialCU>{ 
        return new FieldUtil('AD_DELIVERY_PLAN_ID','adDeliveryPlanId','投放计划id', new Ad_delivery_plan_position_materialCUImpl());
    }
    static get AD_POSITION_ID(): FieldUtil<Ad_delivery_plan_position_materialCU>{ 
        return new FieldUtil('AD_POSITION_ID','adPositionId','广告位id', new Ad_delivery_plan_position_materialCUImpl());
    }
    static get AD_MATERIAL_ID(): FieldUtil<Ad_delivery_plan_position_materialCU>{ 
        return new FieldUtil('AD_MATERIAL_ID','adMaterialId','素材id', new Ad_delivery_plan_position_materialCUImpl());
    }
    static get AD_STYLE_ID(): FieldUtil<Ad_delivery_plan_position_materialCU>{ 
        return new FieldUtil('AD_STYLE_ID','adStyleId','样式id', new Ad_delivery_plan_position_materialCUImpl());
    }
    static get DEL_FLAG(): FieldUtil<Ad_delivery_plan_position_materialCU>{ 
        return new FieldUtil('DEL_FLAG','delFlag','是否删除：0，否；1，是', new Ad_delivery_plan_position_materialCUImpl());
    }

    get AD_DELIVERY_PLAN_ID(): FieldUtil<Ad_delivery_plan_position_materialCU>{ 
        return Ad_delivery_plan_position_materialMU.AD_DELIVERY_PLAN_ID;
    }
    get AD_POSITION_ID(): FieldUtil<Ad_delivery_plan_position_materialCU>{ 
        return Ad_delivery_plan_position_materialMU.AD_POSITION_ID;
    }
    get AD_MATERIAL_ID(): FieldUtil<Ad_delivery_plan_position_materialCU>{ 
        return Ad_delivery_plan_position_materialMU.AD_MATERIAL_ID;
    }
    get AD_STYLE_ID(): FieldUtil<Ad_delivery_plan_position_materialCU>{ 
        return Ad_delivery_plan_position_materialMU.AD_STYLE_ID;
    }
    get DEL_FLAG(): FieldUtil<Ad_delivery_plan_position_materialCU>{ 
        return Ad_delivery_plan_position_materialMU.DEL_FLAG;
    }
}
export {Ad_delivery_plan_position_materialMU, Ad_delivery_plan_position_materialCU}
