import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { AdDeliveryPlanPerUserStatistics } from '../models/index' 
/**
 * @author auto generate
 * @version 1.1
 * @date 2021-06-01 13:27
 */
interface AdDeliveryPlanPerUserStatisticsCU extends ConditionUtil<AdDeliveryPlanPerUserStatisticsCU>{
    AD_DELIVERY_PLAN_ID:FieldUtil<AdDeliveryPlanPerUserStatisticsCU>;
    USER_ID:FieldUtil<AdDeliveryPlanPerUserStatisticsCU>;
    USER_TYPE:FieldUtil<AdDeliveryPlanPerUserStatisticsCU>;
    AD_INFO_ID:FieldUtil<AdDeliveryPlanPerUserStatisticsCU>;
    REQUEST_TIMES:FieldUtil<AdDeliveryPlanPerUserStatisticsCU>;
    IMPRESSION_TIMES:FieldUtil<AdDeliveryPlanPerUserStatisticsCU>;
    CLICK_TIMES:FieldUtil<AdDeliveryPlanPerUserStatisticsCU>;
    ACTION_TIMES:FieldUtil<AdDeliveryPlanPerUserStatisticsCU>;
}

class AdDeliveryPlanPerUserStatisticsCUImpl extends ConditionUtilImpl<AdDeliveryPlanPerUserStatisticsCUImpl> implements AdDeliveryPlanPerUserStatisticsCU{ 
    newInstance(): AdDeliveryPlanPerUserStatisticsCUImpl {
        return new AdDeliveryPlanPerUserStatisticsCUImpl();
    } 
    get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{  
        return new FieldUtil('ad_delivery_plan_id','adDeliveryPlanId','', this);
    }
    get USER_ID(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{  
        return new FieldUtil('user_id','userId','用户id', this);
    }
    get USER_TYPE(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{  
        return new FieldUtil('user_type','userType','用户类型：0，速停车用户；1，非速停车用户', this);
    }
    get AD_INFO_ID(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{  
        return new FieldUtil('ad_info_id','adInfoId','广告id', this);
    }
    get REQUEST_TIMES(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{  
        return new FieldUtil('request_times','requestTimes','请求次数', this);
    }
    get IMPRESSION_TIMES(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{  
        return new FieldUtil('impression_times','impressionTimes','展示次数', this);
    }
    get CLICK_TIMES(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{  
        return new FieldUtil('click_times','clickTimes','点击次数', this);
    }
    get ACTION_TIMES(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{  
        return new FieldUtil('action_times','actionTimes','成交次数', this);
    }
}

@Singleton 
class AdDeliveryPlanPerUserStatisticsMU extends TableUtilImpl<AdDeliveryPlanPerUserStatisticsCU,AdDeliveryPlanPerUserStatistics>{ 
    tableName  = 'ad_delivery_plan_per_user_statistics';
    tableFields  = ['ad_delivery_plan_id','user_id','user_type','ad_info_id','request_times','impression_times','click_times','action_times'];
    modelFields  = ['adDeliveryPlanId','userId','userType','adInfoId','requestTimes','impressionTimes','clickTimes','actionTimes'];
    modelIdFields  = ['adDeliveryPlanId','userId','userType'];
    tableIdFields  = ['ad_delivery_plan_id','user_id','user_type'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): AdDeliveryPlanPerUserStatisticsCU {
        return new AdDeliveryPlanPerUserStatisticsCUImpl();
    }   

    static get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return new FieldUtil('ad_delivery_plan_id','adDeliveryPlanId','', new AdDeliveryPlanPerUserStatisticsCUImpl());
    }
    static get USER_ID(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return new FieldUtil('user_id','userId','用户id', new AdDeliveryPlanPerUserStatisticsCUImpl());
    }
    static get USER_TYPE(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return new FieldUtil('user_type','userType','用户类型：0，速停车用户；1，非速停车用户', new AdDeliveryPlanPerUserStatisticsCUImpl());
    }
    static get AD_INFO_ID(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return new FieldUtil('ad_info_id','adInfoId','广告id', new AdDeliveryPlanPerUserStatisticsCUImpl());
    }
    static get REQUEST_TIMES(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return new FieldUtil('request_times','requestTimes','请求次数', new AdDeliveryPlanPerUserStatisticsCUImpl());
    }
    static get IMPRESSION_TIMES(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return new FieldUtil('impression_times','impressionTimes','展示次数', new AdDeliveryPlanPerUserStatisticsCUImpl());
    }
    static get CLICK_TIMES(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return new FieldUtil('click_times','clickTimes','点击次数', new AdDeliveryPlanPerUserStatisticsCUImpl());
    }
    static get ACTION_TIMES(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return new FieldUtil('action_times','actionTimes','成交次数', new AdDeliveryPlanPerUserStatisticsCUImpl());
    }

    get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return AdDeliveryPlanPerUserStatisticsMU.AD_DELIVERY_PLAN_ID;
    }
    get USER_ID(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return AdDeliveryPlanPerUserStatisticsMU.USER_ID;
    }
    get USER_TYPE(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return AdDeliveryPlanPerUserStatisticsMU.USER_TYPE;
    }
    get AD_INFO_ID(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return AdDeliveryPlanPerUserStatisticsMU.AD_INFO_ID;
    }
    get REQUEST_TIMES(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return AdDeliveryPlanPerUserStatisticsMU.REQUEST_TIMES;
    }
    get IMPRESSION_TIMES(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return AdDeliveryPlanPerUserStatisticsMU.IMPRESSION_TIMES;
    }
    get CLICK_TIMES(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return AdDeliveryPlanPerUserStatisticsMU.CLICK_TIMES;
    }
    get ACTION_TIMES(): FieldUtil<AdDeliveryPlanPerUserStatisticsCU>{ 
        return AdDeliveryPlanPerUserStatisticsMU.ACTION_TIMES;
    }
}
export {AdDeliveryPlanPerUserStatisticsMU, AdDeliveryPlanPerUserStatisticsCU}
