import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { AdDeliveryPlanStatistics } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-05-28 10:30
 */
interface AdDeliveryPlanStatisticsCU extends ConditionUtil<AdDeliveryPlanStatisticsCU>{
    AD_DELIVERY_PLAN_ID:FieldUtil<AdDeliveryPlanStatisticsCU>;
    AD_INFO_ID:FieldUtil<AdDeliveryPlanStatisticsCU>;
    REQUEST_TIMES:FieldUtil<AdDeliveryPlanStatisticsCU>;
    IMPRESSION_TIMES:FieldUtil<AdDeliveryPlanStatisticsCU>;
    CLICK_TIMES:FieldUtil<AdDeliveryPlanStatisticsCU>;
    ACTION_TIMES:FieldUtil<AdDeliveryPlanStatisticsCU>;
}

class AdDeliveryPlanStatisticsCUImpl extends ConditionUtilImpl<AdDeliveryPlanStatisticsCUImpl> implements AdDeliveryPlanStatisticsCU{ 
    newInstance(): AdDeliveryPlanStatisticsCUImpl {
        return new AdDeliveryPlanStatisticsCUImpl();
    } 
    get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanStatisticsCU>{  
        return new FieldUtil('ad_delivery_plan_id','adDeliveryPlanId','', this);
    }
    get AD_INFO_ID(): FieldUtil<AdDeliveryPlanStatisticsCU>{  
        return new FieldUtil('ad_info_id','adInfoId','广告id', this);
    }
    get REQUEST_TIMES(): FieldUtil<AdDeliveryPlanStatisticsCU>{  
        return new FieldUtil('request_times','requestTimes','请求次数', this);
    }
    get IMPRESSION_TIMES(): FieldUtil<AdDeliveryPlanStatisticsCU>{  
        return new FieldUtil('impression_times','impressionTimes','展示次数', this);
    }
    get CLICK_TIMES(): FieldUtil<AdDeliveryPlanStatisticsCU>{  
        return new FieldUtil('click_times','clickTimes','点击次数', this);
    }
    get ACTION_TIMES(): FieldUtil<AdDeliveryPlanStatisticsCU>{  
        return new FieldUtil('action_times','actionTimes','成交次数', this);
    }
}

@Singleton 
class AdDeliveryPlanStatisticsMU extends TableUtilImpl<AdDeliveryPlanStatisticsCU,AdDeliveryPlanStatistics>{ 
    tableName  = 'ad_delivery_plan_statistics';
    tableFields  = ['ad_delivery_plan_id','ad_info_id','request_times','impression_times','click_times','action_times'];
    modelFields  = ['adDeliveryPlanId','adInfoId','requestTimes','impressionTimes','clickTimes','actionTimes'];
    modelIdFields  = ['adDeliveryPlanId'];
    tableIdFields  = ['ad_delivery_plan_id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): AdDeliveryPlanStatisticsCU {
        return new AdDeliveryPlanStatisticsCUImpl();
    }   

    static get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanStatisticsCU>{ 
        return new FieldUtil('ad_delivery_plan_id','adDeliveryPlanId','', new AdDeliveryPlanStatisticsCUImpl());
    }
    static get AD_INFO_ID(): FieldUtil<AdDeliveryPlanStatisticsCU>{ 
        return new FieldUtil('ad_info_id','adInfoId','广告id', new AdDeliveryPlanStatisticsCUImpl());
    }
    static get REQUEST_TIMES(): FieldUtil<AdDeliveryPlanStatisticsCU>{ 
        return new FieldUtil('request_times','requestTimes','请求次数', new AdDeliveryPlanStatisticsCUImpl());
    }
    static get IMPRESSION_TIMES(): FieldUtil<AdDeliveryPlanStatisticsCU>{ 
        return new FieldUtil('impression_times','impressionTimes','展示次数', new AdDeliveryPlanStatisticsCUImpl());
    }
    static get CLICK_TIMES(): FieldUtil<AdDeliveryPlanStatisticsCU>{ 
        return new FieldUtil('click_times','clickTimes','点击次数', new AdDeliveryPlanStatisticsCUImpl());
    }
    static get ACTION_TIMES(): FieldUtil<AdDeliveryPlanStatisticsCU>{ 
        return new FieldUtil('action_times','actionTimes','成交次数', new AdDeliveryPlanStatisticsCUImpl());
    }

    get AD_DELIVERY_PLAN_ID(): FieldUtil<AdDeliveryPlanStatisticsCU>{ 
        return AdDeliveryPlanStatisticsMU.AD_DELIVERY_PLAN_ID;
    }
    get AD_INFO_ID(): FieldUtil<AdDeliveryPlanStatisticsCU>{ 
        return AdDeliveryPlanStatisticsMU.AD_INFO_ID;
    }
    get REQUEST_TIMES(): FieldUtil<AdDeliveryPlanStatisticsCU>{ 
        return AdDeliveryPlanStatisticsMU.REQUEST_TIMES;
    }
    get IMPRESSION_TIMES(): FieldUtil<AdDeliveryPlanStatisticsCU>{ 
        return AdDeliveryPlanStatisticsMU.IMPRESSION_TIMES;
    }
    get CLICK_TIMES(): FieldUtil<AdDeliveryPlanStatisticsCU>{ 
        return AdDeliveryPlanStatisticsMU.CLICK_TIMES;
    }
    get ACTION_TIMES(): FieldUtil<AdDeliveryPlanStatisticsCU>{ 
        return AdDeliveryPlanStatisticsMU.ACTION_TIMES;
    }
}
export {AdDeliveryPlanStatisticsMU, AdDeliveryPlanStatisticsCU}
