import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { DevopsUser } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-03-31 10:35
 */
interface DevopsUserCU extends ConditionUtil<DevopsUserCU>{
    ID:FieldUtil<DevopsUserCU>;
    STATE:FieldUtil<DevopsUserCU>;
    CREATE_TIME:FieldUtil<DevopsUserCU>;
    UPDATE_TIME:FieldUtil<DevopsUserCU>;
    ALLOW_ROLLBACK_OP:FieldUtil<DevopsUserCU>;
    EWECHAT_USER_ID:FieldUtil<DevopsUserCU>;
    NAME:FieldUtil<DevopsUserCU>;
    MOBILE:FieldUtil<DevopsUserCU>;
    ROLE:FieldUtil<DevopsUserCU>;
}

class DevopsUserCUImpl extends ConditionUtilImpl<DevopsUserCUImpl> implements DevopsUserCU{ 
    newInstance(): DevopsUserCUImpl {
        return new DevopsUserCUImpl();
    } 
    get ID(): FieldUtil<DevopsUserCU>{  
        return new FieldUtil('ID','id','', this);
    }
    get STATE(): FieldUtil<DevopsUserCU>{  
        return new FieldUtil('STATE','state','', this);
    }
    get CREATE_TIME(): FieldUtil<DevopsUserCU>{  
        return new FieldUtil('CREATE_TIME','createTime','', this);
    }
    get UPDATE_TIME(): FieldUtil<DevopsUserCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','', this);
    }
    get ALLOW_ROLLBACK_OP(): FieldUtil<DevopsUserCU>{  
        return new FieldUtil('ALLOW_ROLLBACK_OP','allowRollbackOp','', this);
    }
    get EWECHAT_USER_ID(): FieldUtil<DevopsUserCU>{  
        return new FieldUtil('EWECHAT_USER_ID','ewechatUserId','', this);
    }
    get NAME(): FieldUtil<DevopsUserCU>{  
        return new FieldUtil('NAME','name','', this);
    }
    get MOBILE(): FieldUtil<DevopsUserCU>{  
        return new FieldUtil('MOBILE','mobile','', this);
    }
    get ROLE(): FieldUtil<DevopsUserCU>{  
        return new FieldUtil('ROLE','role','角色（1-管理员；2-操作员；3-观察员）', this);
    }
}

@Singleton 
class DevopsUserMU extends TableUtilImpl<DevopsUserCU,DevopsUser>{ 
    tableName  = 'devops_user';
    tableFields  = ['id','state','create_time','update_time','allow_rollback_op','ewechat_user_id','name','mobile','role'];
    modelFields  = ['id','state','createTime','updateTime','allowRollbackOp','ewechatUserId','name','mobile','role'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): DevopsUserCU {
        return new DevopsUserCUImpl();
    }   

    static get ID(): FieldUtil<DevopsUserCU>{ 
        return new FieldUtil('ID','id','', new DevopsUserCUImpl());
    }
    static get STATE(): FieldUtil<DevopsUserCU>{ 
        return new FieldUtil('STATE','state','', new DevopsUserCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<DevopsUserCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','', new DevopsUserCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<DevopsUserCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','', new DevopsUserCUImpl());
    }
    static get ALLOW_ROLLBACK_OP(): FieldUtil<DevopsUserCU>{ 
        return new FieldUtil('ALLOW_ROLLBACK_OP','allowRollbackOp','', new DevopsUserCUImpl());
    }
    static get EWECHAT_USER_ID(): FieldUtil<DevopsUserCU>{ 
        return new FieldUtil('EWECHAT_USER_ID','ewechatUserId','', new DevopsUserCUImpl());
    }
    static get NAME(): FieldUtil<DevopsUserCU>{ 
        return new FieldUtil('NAME','name','', new DevopsUserCUImpl());
    }
    static get MOBILE(): FieldUtil<DevopsUserCU>{ 
        return new FieldUtil('MOBILE','mobile','', new DevopsUserCUImpl());
    }
    static get ROLE(): FieldUtil<DevopsUserCU>{ 
        return new FieldUtil('ROLE','role','角色（1-管理员；2-操作员；3-观察员）', new DevopsUserCUImpl());
    }

    get ID(): FieldUtil<DevopsUserCU>{ 
        return DevopsUserMU.ID;
    }
    get STATE(): FieldUtil<DevopsUserCU>{ 
        return DevopsUserMU.STATE;
    }
    get CREATE_TIME(): FieldUtil<DevopsUserCU>{ 
        return DevopsUserMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<DevopsUserCU>{ 
        return DevopsUserMU.UPDATE_TIME;
    }
    get ALLOW_ROLLBACK_OP(): FieldUtil<DevopsUserCU>{ 
        return DevopsUserMU.ALLOW_ROLLBACK_OP;
    }
    get EWECHAT_USER_ID(): FieldUtil<DevopsUserCU>{ 
        return DevopsUserMU.EWECHAT_USER_ID;
    }
    get NAME(): FieldUtil<DevopsUserCU>{ 
        return DevopsUserMU.NAME;
    }
    get MOBILE(): FieldUtil<DevopsUserCU>{ 
        return DevopsUserMU.MOBILE;
    }
    get ROLE(): FieldUtil<DevopsUserCU>{ 
        return DevopsUserMU.ROLE;
    }
}
export {DevopsUserMU, DevopsUserCU}
