import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { PpMobileUserInfo } from '../models/index' 
/**
 * @author auto generate
 * @version 1.2
 * @date 2021-09-26 15:50
 */
interface PpMobileUserInfoCU extends ConditionUtil<PpMobileUserInfoCU>{
    USER_ID:FieldUtil<PpMobileUserInfoCU>;
    PHONE:FieldUtil<PpMobileUserInfoCU>;
    POINTS:FieldUtil<PpMobileUserInfoCU>;
    CYPOINTS:FieldUtil<PpMobileUserInfoCU>;
    CREATE_TIME:FieldUtil<PpMobileUserInfoCU>;
    UPDATE_TIME:FieldUtil<PpMobileUserInfoCU>;
}

class PpMobileUserInfoCUImpl extends ConditionUtilImpl<PpMobileUserInfoCUImpl> implements PpMobileUserInfoCU{ 
    newInstance(): PpMobileUserInfoCUImpl {
        return new PpMobileUserInfoCUImpl();
    } 
    get USER_ID(): FieldUtil<PpMobileUserInfoCU>{  
        return new FieldUtil('USER_ID','userId','', this);
    }
    get PHONE(): FieldUtil<PpMobileUserInfoCU>{  
        return new FieldUtil('PHONE','phone','手机号', this);
    }
    get POINTS(): FieldUtil<PpMobileUserInfoCU>{  
        return new FieldUtil('POINTS','points','移动积分', this);
    }
    get CYPOINTS(): FieldUtil<PpMobileUserInfoCU>{  
        return new FieldUtil('CYPOINTS','cypoints','畅由积分', this);
    }
    get CREATE_TIME(): FieldUtil<PpMobileUserInfoCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<PpMobileUserInfoCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
}

@Singleton 
class PpMobileUserInfoMU extends TableUtilImpl<PpMobileUserInfoCU,PpMobileUserInfo>{ 
    tableName  = 'pp_mobile_user_info';
    tableFields  = ['USER_ID','PHONE','POINTS','CYPOINTS','CREATE_TIME','UPDATE_TIME'];
    modelFields  = ['userId','phone','points','cypoints','createTime','updateTime'];
    modelIdFields  = ['userId'];
    tableIdFields  = ['USER_ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): PpMobileUserInfoCU {
        return new PpMobileUserInfoCUImpl();
    }   

    static get USER_ID(): FieldUtil<PpMobileUserInfoCU>{ 
        return new FieldUtil('USER_ID','userId','', new PpMobileUserInfoCUImpl());
    }
    static get PHONE(): FieldUtil<PpMobileUserInfoCU>{ 
        return new FieldUtil('PHONE','phone','手机号', new PpMobileUserInfoCUImpl());
    }
    static get POINTS(): FieldUtil<PpMobileUserInfoCU>{ 
        return new FieldUtil('POINTS','points','移动积分', new PpMobileUserInfoCUImpl());
    }
    static get CYPOINTS(): FieldUtil<PpMobileUserInfoCU>{ 
        return new FieldUtil('CYPOINTS','cypoints','畅由积分', new PpMobileUserInfoCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<PpMobileUserInfoCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new PpMobileUserInfoCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<PpMobileUserInfoCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new PpMobileUserInfoCUImpl());
    }

    get USER_ID(): FieldUtil<PpMobileUserInfoCU>{ 
        return PpMobileUserInfoMU.USER_ID;
    }
    get PHONE(): FieldUtil<PpMobileUserInfoCU>{ 
        return PpMobileUserInfoMU.PHONE;
    }
    get POINTS(): FieldUtil<PpMobileUserInfoCU>{ 
        return PpMobileUserInfoMU.POINTS;
    }
    get CYPOINTS(): FieldUtil<PpMobileUserInfoCU>{ 
        return PpMobileUserInfoMU.CYPOINTS;
    }
    get CREATE_TIME(): FieldUtil<PpMobileUserInfoCU>{ 
        return PpMobileUserInfoMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<PpMobileUserInfoCU>{ 
        return PpMobileUserInfoMU.UPDATE_TIME;
    }
}
export {PpMobileUserInfoMU, PpMobileUserInfoCU}
