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_display_per_user } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-04-15 11:42
 */
interface Ad_delivery_plan_display_per_userCU extends ConditionUtil<Ad_delivery_plan_display_per_userCU>{
    AD_DELIVERY_PLAN_ID:FieldUtil<Ad_delivery_plan_display_per_userCU>;
    USER_ID:FieldUtil<Ad_delivery_plan_display_per_userCU>;
    USER_TYPE:FieldUtil<Ad_delivery_plan_display_per_userCU>;
    AD_INFO_ID:FieldUtil<Ad_delivery_plan_display_per_userCU>;
    SERVER_DISPLAY_TIMES:FieldUtil<Ad_delivery_plan_display_per_userCU>;
    CLIENT_DISPLAY_TIMES:FieldUtil<Ad_delivery_plan_display_per_userCU>;
    LIMIT_DISPLAY_TIMES:FieldUtil<Ad_delivery_plan_display_per_userCU>;
}

class Ad_delivery_plan_display_per_userCUImpl extends ConditionUtilImpl<Ad_delivery_plan_display_per_userCUImpl> implements Ad_delivery_plan_display_per_userCU{ 
    newInstance(): Ad_delivery_plan_display_per_userCUImpl {
        return new Ad_delivery_plan_display_per_userCUImpl();
    } 
    get AD_DELIVERY_PLAN_ID(): FieldUtil<Ad_delivery_plan_display_per_userCU>{  
        return new FieldUtil('AD_DELIVERY_PLAN_ID','adDeliveryPlanId','', this);
    }
    get USER_ID(): FieldUtil<Ad_delivery_plan_display_per_userCU>{  
        return new FieldUtil('USER_ID','userId','用户id', this);
    }
    get USER_TYPE(): FieldUtil<Ad_delivery_plan_display_per_userCU>{  
        return new FieldUtil('USER_TYPE','userType','用户类型：0，速停车用户；1，非速停车用户', this);
    }
    get AD_INFO_ID(): FieldUtil<Ad_delivery_plan_display_per_userCU>{  
        return new FieldUtil('AD_INFO_ID','adInfoId','广告id', this);
    }
    get SERVER_DISPLAY_TIMES(): FieldUtil<Ad_delivery_plan_display_per_userCU>{  
        return new FieldUtil('SERVER_DISPLAY_TIMES','serverDisplayTimes','服务端上报次数', this);
    }
    get CLIENT_DISPLAY_TIMES(): FieldUtil<Ad_delivery_plan_display_per_userCU>{  
        return new FieldUtil('CLIENT_DISPLAY_TIMES','clientDisplayTimes','客户端上报次数', this);
    }
    get LIMIT_DISPLAY_TIMES(): FieldUtil<Ad_delivery_plan_display_per_userCU>{  
        return new FieldUtil('LIMIT_DISPLAY_TIMES','limitDisplayTimes','限制曝光次数', this);
    }
}

@Singleton 
class Ad_delivery_plan_display_per_userMU extends TableUtilImpl<Ad_delivery_plan_display_per_userCU,Ad_delivery_plan_display_per_user>{ 
    tableName  = 'ad_delivery_plan_display_per_user';
    tableFields  = ['ad_delivery_plan_id','user_id','user_type','ad_info_id','server_display_times','client_display_times','limit_display_times'];
    modelFields  = ['adDeliveryPlanId','userId','userType','adInfoId','serverDisplayTimes','clientDisplayTimes','limitDisplayTimes'];
    modelIdFields  = ['adDeliveryPlanId','userId','userType'];
    tableIdFields  = ['ad_delivery_plan_id','user_id','user_type'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): Ad_delivery_plan_display_per_userCU {
        return new Ad_delivery_plan_display_per_userCUImpl();
    }   

    static get AD_DELIVERY_PLAN_ID(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return new FieldUtil('AD_DELIVERY_PLAN_ID','adDeliveryPlanId','', new Ad_delivery_plan_display_per_userCUImpl());
    }
    static get USER_ID(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return new FieldUtil('USER_ID','userId','用户id', new Ad_delivery_plan_display_per_userCUImpl());
    }
    static get USER_TYPE(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return new FieldUtil('USER_TYPE','userType','用户类型：0，速停车用户；1，非速停车用户', new Ad_delivery_plan_display_per_userCUImpl());
    }
    static get AD_INFO_ID(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return new FieldUtil('AD_INFO_ID','adInfoId','广告id', new Ad_delivery_plan_display_per_userCUImpl());
    }
    static get SERVER_DISPLAY_TIMES(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return new FieldUtil('SERVER_DISPLAY_TIMES','serverDisplayTimes','服务端上报次数', new Ad_delivery_plan_display_per_userCUImpl());
    }
    static get CLIENT_DISPLAY_TIMES(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return new FieldUtil('CLIENT_DISPLAY_TIMES','clientDisplayTimes','客户端上报次数', new Ad_delivery_plan_display_per_userCUImpl());
    }
    static get LIMIT_DISPLAY_TIMES(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return new FieldUtil('LIMIT_DISPLAY_TIMES','limitDisplayTimes','限制曝光次数', new Ad_delivery_plan_display_per_userCUImpl());
    }

    get AD_DELIVERY_PLAN_ID(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return Ad_delivery_plan_display_per_userMU.AD_DELIVERY_PLAN_ID;
    }
    get USER_ID(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return Ad_delivery_plan_display_per_userMU.USER_ID;
    }
    get USER_TYPE(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return Ad_delivery_plan_display_per_userMU.USER_TYPE;
    }
    get AD_INFO_ID(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return Ad_delivery_plan_display_per_userMU.AD_INFO_ID;
    }
    get SERVER_DISPLAY_TIMES(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return Ad_delivery_plan_display_per_userMU.SERVER_DISPLAY_TIMES;
    }
    get CLIENT_DISPLAY_TIMES(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return Ad_delivery_plan_display_per_userMU.CLIENT_DISPLAY_TIMES;
    }
    get LIMIT_DISPLAY_TIMES(): FieldUtil<Ad_delivery_plan_display_per_userCU>{ 
        return Ad_delivery_plan_display_per_userMU.LIMIT_DISPLAY_TIMES;
    }
}
export {Ad_delivery_plan_display_per_userMU, Ad_delivery_plan_display_per_userCU}
