import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { UserPlate } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2020-10-16 11:27
 */
interface UserPlateCU extends ConditionUtil<UserPlateCU>{
    ID:FieldUtil<UserPlateCU>;
    USER_ID:FieldUtil<UserPlateCU>;
    PLATE_NO:FieldUtil<UserPlateCU>;
    PLATE_DEFAULT:FieldUtil<UserPlateCU>;
    BIZ_STATUS:FieldUtil<UserPlateCU>;
    CREATE_USER_ID:FieldUtil<UserPlateCU>;
    UPDATE_USER_ID:FieldUtil<UserPlateCU>;
    REMARK:FieldUtil<UserPlateCU>;
    CREATE_TIME:FieldUtil<UserPlateCU>;
    UPDATE_TIME:FieldUtil<UserPlateCU>;
    STATE:FieldUtil<UserPlateCU>;
}

class UserPlateCUImpl extends ConditionUtilImpl<UserPlateCUImpl> implements UserPlateCU{ 
    newInstance(): UserPlateCUImpl {
        return new UserPlateCUImpl();
    } 
    get ID(): FieldUtil<UserPlateCU>{  
        return new FieldUtil('ID','id','', this);
    }
    get USER_ID(): FieldUtil<UserPlateCU>{  
        return new FieldUtil('USER_ID','userId','用户id', this);
    }
    get PLATE_NO(): FieldUtil<UserPlateCU>{  
        return new FieldUtil('PLATE_NO','plateNo','车牌号', this);
    }
    get PLATE_DEFAULT(): FieldUtil<UserPlateCU>{  
        return new FieldUtil('PLATE_DEFAULT','plateDefault','默认：0-非默认车牌，1-默认车牌', this);
    }
    get BIZ_STATUS(): FieldUtil<UserPlateCU>{  
        return new FieldUtil('BIZ_STATUS','bizStatus','业务状态：0-正常，1-关闭', this);
    }
    get CREATE_USER_ID(): FieldUtil<UserPlateCU>{  
        return new FieldUtil('CREATE_USER_ID','createUserId','', this);
    }
    get UPDATE_USER_ID(): FieldUtil<UserPlateCU>{  
        return new FieldUtil('UPDATE_USER_ID','updateUserId','', this);
    }
    get REMARK(): FieldUtil<UserPlateCU>{  
        return new FieldUtil('REMARK','remark','备注', this);
    }
    get CREATE_TIME(): FieldUtil<UserPlateCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<UserPlateCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
    get STATE(): FieldUtil<UserPlateCU>{  
        return new FieldUtil('STATE','state','状态：0-正常，1-删除', this);
    }
}

@Singleton 
class UserPlateMU extends TableUtilImpl<UserPlateCU,UserPlate>{ 
    tableName  = 'user_plate';
    tableFields  = ['id','user_id','plate_no','plate_default','biz_status','create_user_id','update_user_id','remark','create_time','update_time','state'];
    modelFields  = ['id','userId','plateNo','plateDefault','bizStatus','createUserId','updateUserId','remark','createTime','updateTime','state'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): UserPlateCU {
        return new UserPlateCUImpl();
    }   

    static get ID(): FieldUtil<UserPlateCU>{ 
        return new FieldUtil('ID','id','', new UserPlateCUImpl());
    }
    static get USER_ID(): FieldUtil<UserPlateCU>{ 
        return new FieldUtil('USER_ID','userId','用户id', new UserPlateCUImpl());
    }
    static get PLATE_NO(): FieldUtil<UserPlateCU>{ 
        return new FieldUtil('PLATE_NO','plateNo','车牌号', new UserPlateCUImpl());
    }
    static get PLATE_DEFAULT(): FieldUtil<UserPlateCU>{ 
        return new FieldUtil('PLATE_DEFAULT','plateDefault','默认：0-非默认车牌，1-默认车牌', new UserPlateCUImpl());
    }
    static get BIZ_STATUS(): FieldUtil<UserPlateCU>{ 
        return new FieldUtil('BIZ_STATUS','bizStatus','业务状态：0-正常，1-关闭', new UserPlateCUImpl());
    }
    static get CREATE_USER_ID(): FieldUtil<UserPlateCU>{ 
        return new FieldUtil('CREATE_USER_ID','createUserId','', new UserPlateCUImpl());
    }
    static get UPDATE_USER_ID(): FieldUtil<UserPlateCU>{ 
        return new FieldUtil('UPDATE_USER_ID','updateUserId','', new UserPlateCUImpl());
    }
    static get REMARK(): FieldUtil<UserPlateCU>{ 
        return new FieldUtil('REMARK','remark','备注', new UserPlateCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<UserPlateCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new UserPlateCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<UserPlateCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new UserPlateCUImpl());
    }
    static get STATE(): FieldUtil<UserPlateCU>{ 
        return new FieldUtil('STATE','state','状态：0-正常，1-删除', new UserPlateCUImpl());
    }

    get ID(): FieldUtil<UserPlateCU>{ 
        return UserPlateMU.ID;
    }
    get USER_ID(): FieldUtil<UserPlateCU>{ 
        return UserPlateMU.USER_ID;
    }
    get PLATE_NO(): FieldUtil<UserPlateCU>{ 
        return UserPlateMU.PLATE_NO;
    }
    get PLATE_DEFAULT(): FieldUtil<UserPlateCU>{ 
        return UserPlateMU.PLATE_DEFAULT;
    }
    get BIZ_STATUS(): FieldUtil<UserPlateCU>{ 
        return UserPlateMU.BIZ_STATUS;
    }
    get CREATE_USER_ID(): FieldUtil<UserPlateCU>{ 
        return UserPlateMU.CREATE_USER_ID;
    }
    get UPDATE_USER_ID(): FieldUtil<UserPlateCU>{ 
        return UserPlateMU.UPDATE_USER_ID;
    }
    get REMARK(): FieldUtil<UserPlateCU>{ 
        return UserPlateMU.REMARK;
    }
    get CREATE_TIME(): FieldUtil<UserPlateCU>{ 
        return UserPlateMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<UserPlateCU>{ 
        return UserPlateMU.UPDATE_TIME;
    }
    get STATE(): FieldUtil<UserPlateCU>{ 
        return UserPlateMU.STATE;
    }
}
export {UserPlateMU, UserPlateCU}
