import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { PpTelecomChongqingPhonePrefix } from '../models/index' 
/**
 * @author auto generate
 * @version 1.2
 * @date 2021-08-18 09:25
 */
interface PpTelecomChongqingPhonePrefixCU extends ConditionUtil<PpTelecomChongqingPhonePrefixCU>{
    PHONE:FieldUtil<PpTelecomChongqingPhonePrefixCU>;
}

class PpTelecomChongqingPhonePrefixCUImpl extends ConditionUtilImpl<PpTelecomChongqingPhonePrefixCUImpl> implements PpTelecomChongqingPhonePrefixCU{ 
    newInstance(): PpTelecomChongqingPhonePrefixCUImpl {
        return new PpTelecomChongqingPhonePrefixCUImpl();
    } 
    get PHONE(): FieldUtil<PpTelecomChongqingPhonePrefixCU>{  
        return new FieldUtil('PHONE','phone','重启电信手机号段（前7位）', this);
    }
}

@Singleton 
class PpTelecomChongqingPhonePrefixMU extends TableUtilImpl<PpTelecomChongqingPhonePrefixCU,PpTelecomChongqingPhonePrefix>{ 
    tableName  = 'pp_telecom_chongqing_phone_prefix';
    tableFields  = ['PHONE'];
    modelFields  = ['phone'];
    modelIdFields  = ['phone'];
    tableIdFields  = ['PHONE'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): PpTelecomChongqingPhonePrefixCU {
        return new PpTelecomChongqingPhonePrefixCUImpl();
    }   

    static get PHONE(): FieldUtil<PpTelecomChongqingPhonePrefixCU>{ 
        return new FieldUtil('PHONE','phone','重启电信手机号段（前7位）', new PpTelecomChongqingPhonePrefixCUImpl());
    }

    get PHONE(): FieldUtil<PpTelecomChongqingPhonePrefixCU>{ 
        return PpTelecomChongqingPhonePrefixMU.PHONE;
    }
}
export {PpTelecomChongqingPhonePrefixMU, PpTelecomChongqingPhonePrefixCU}
