import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { PpTelecomUserInfo } from '../models/index' 
/**
 * @author auto generate
 * @version 1.1
 * @date 2021-08-09 17:45
 */
interface PpTelecomUserInfoCU extends ConditionUtil<PpTelecomUserInfoCU>{
    USER_ID:FieldUtil<PpTelecomUserInfoCU>;
    PHONE:FieldUtil<PpTelecomUserInfoCU>;
    CREATE_TIME:FieldUtil<PpTelecomUserInfoCU>;
    UPDATE_TIME:FieldUtil<PpTelecomUserInfoCU>;
}

class PpTelecomUserInfoCUImpl extends ConditionUtilImpl<PpTelecomUserInfoCUImpl> implements PpTelecomUserInfoCU{ 
    newInstance(): PpTelecomUserInfoCUImpl {
        return new PpTelecomUserInfoCUImpl();
    } 
    get USER_ID(): FieldUtil<PpTelecomUserInfoCU>{  
        return new FieldUtil('USER_ID','userId','', this);
    }
    get PHONE(): FieldUtil<PpTelecomUserInfoCU>{  
        return new FieldUtil('PHONE','phone','手机号', this);
    }
    get CREATE_TIME(): FieldUtil<PpTelecomUserInfoCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<PpTelecomUserInfoCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
}

@Singleton 
class PpTelecomUserInfoMU extends TableUtilImpl<PpTelecomUserInfoCU,PpTelecomUserInfo>{ 
    tableName  = 'pp_telecom_user_info';
    tableFields  = ['USER_ID','PHONE','CREATE_TIME','UPDATE_TIME'];
    modelFields  = ['userId','phone','createTime','updateTime'];
    modelIdFields  = ['userId'];
    tableIdFields  = ['USER_ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): PpTelecomUserInfoCU {
        return new PpTelecomUserInfoCUImpl();
    }   

    static get USER_ID(): FieldUtil<PpTelecomUserInfoCU>{ 
        return new FieldUtil('USER_ID','userId','', new PpTelecomUserInfoCUImpl());
    }
    static get PHONE(): FieldUtil<PpTelecomUserInfoCU>{ 
        return new FieldUtil('PHONE','phone','手机号', new PpTelecomUserInfoCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<PpTelecomUserInfoCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new PpTelecomUserInfoCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<PpTelecomUserInfoCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new PpTelecomUserInfoCUImpl());
    }

    get USER_ID(): FieldUtil<PpTelecomUserInfoCU>{ 
        return PpTelecomUserInfoMU.USER_ID;
    }
    get PHONE(): FieldUtil<PpTelecomUserInfoCU>{ 
        return PpTelecomUserInfoMU.PHONE;
    }
    get CREATE_TIME(): FieldUtil<PpTelecomUserInfoCU>{ 
        return PpTelecomUserInfoMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<PpTelecomUserInfoCU>{ 
        return PpTelecomUserInfoMU.UPDATE_TIME;
    }
}
export {PpTelecomUserInfoMU, PpTelecomUserInfoCU}
