import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { ParkingLot } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2020-10-16 11:27
 */
interface ParkingLotCU extends ConditionUtil<ParkingLotCU>{
    LOT_ID:FieldUtil<ParkingLotCU>;
    LOT_NAME:FieldUtil<ParkingLotCU>;
    CREATE_TIME:FieldUtil<ParkingLotCU>;
    UPDATE_TIME:FieldUtil<ParkingLotCU>;
    STATE:FieldUtil<ParkingLotCU>;
    REMARK:FieldUtil<ParkingLotCU>;
    BIZ_STATUS:FieldUtil<ParkingLotCU>;
    TOTAL_NUM:FieldUtil<ParkingLotCU>;
    FREE_SPACE_NUM:FieldUtil<ParkingLotCU>;
}

class ParkingLotCUImpl extends ConditionUtilImpl<ParkingLotCUImpl> implements ParkingLotCU{ 
    newInstance(): ParkingLotCUImpl {
        return new ParkingLotCUImpl();
    } 
    get LOT_ID(): FieldUtil<ParkingLotCU>{  
        return new FieldUtil('LOT_ID','lotId','', this);
    }
    get LOT_NAME(): FieldUtil<ParkingLotCU>{  
        return new FieldUtil('LOT_NAME','lotName','', this);
    }
    get CREATE_TIME(): FieldUtil<ParkingLotCU>{  
        return new FieldUtil('CREATE_TIME','createTime','', this);
    }
    get UPDATE_TIME(): FieldUtil<ParkingLotCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','', this);
    }
    get STATE(): FieldUtil<ParkingLotCU>{  
        return new FieldUtil('STATE','state','', this);
    }
    get REMARK(): FieldUtil<ParkingLotCU>{  
        return new FieldUtil('REMARK','remark','', this);
    }
    get BIZ_STATUS(): FieldUtil<ParkingLotCU>{  
        return new FieldUtil('BIZ_STATUS','bizStatus','', this);
    }
    get TOTAL_NUM(): FieldUtil<ParkingLotCU>{  
        return new FieldUtil('TOTAL_NUM','totalNum','总车位数', this);
    }
    get FREE_SPACE_NUM(): FieldUtil<ParkingLotCU>{  
        return new FieldUtil('FREE_SPACE_NUM','freeSpaceNum','空闲车位数', this);
    }
}

@Singleton 
class ParkingLotMU extends TableUtilImpl<ParkingLotCU,ParkingLot>{ 
    tableName  = 'parking_lot';
    tableFields  = ['lot_id','lot_name','create_time','update_time','state','remark','biz_status','total_num','free_space_num'];
    modelFields  = ['lotId','lotName','createTime','updateTime','state','remark','bizStatus','totalNum','freeSpaceNum'];
    modelIdFields  = ['lotId'];
    tableIdFields  = ['lot_id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): ParkingLotCU {
        return new ParkingLotCUImpl();
    }   

    static get LOT_ID(): FieldUtil<ParkingLotCU>{ 
        return new FieldUtil('LOT_ID','lotId','', new ParkingLotCUImpl());
    }
    static get LOT_NAME(): FieldUtil<ParkingLotCU>{ 
        return new FieldUtil('LOT_NAME','lotName','', new ParkingLotCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<ParkingLotCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','', new ParkingLotCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<ParkingLotCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','', new ParkingLotCUImpl());
    }
    static get STATE(): FieldUtil<ParkingLotCU>{ 
        return new FieldUtil('STATE','state','', new ParkingLotCUImpl());
    }
    static get REMARK(): FieldUtil<ParkingLotCU>{ 
        return new FieldUtil('REMARK','remark','', new ParkingLotCUImpl());
    }
    static get BIZ_STATUS(): FieldUtil<ParkingLotCU>{ 
        return new FieldUtil('BIZ_STATUS','bizStatus','', new ParkingLotCUImpl());
    }
    static get TOTAL_NUM(): FieldUtil<ParkingLotCU>{ 
        return new FieldUtil('TOTAL_NUM','totalNum','总车位数', new ParkingLotCUImpl());
    }
    static get FREE_SPACE_NUM(): FieldUtil<ParkingLotCU>{ 
        return new FieldUtil('FREE_SPACE_NUM','freeSpaceNum','空闲车位数', new ParkingLotCUImpl());
    }

    get LOT_ID(): FieldUtil<ParkingLotCU>{ 
        return ParkingLotMU.LOT_ID;
    }
    get LOT_NAME(): FieldUtil<ParkingLotCU>{ 
        return ParkingLotMU.LOT_NAME;
    }
    get CREATE_TIME(): FieldUtil<ParkingLotCU>{ 
        return ParkingLotMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<ParkingLotCU>{ 
        return ParkingLotMU.UPDATE_TIME;
    }
    get STATE(): FieldUtil<ParkingLotCU>{ 
        return ParkingLotMU.STATE;
    }
    get REMARK(): FieldUtil<ParkingLotCU>{ 
        return ParkingLotMU.REMARK;
    }
    get BIZ_STATUS(): FieldUtil<ParkingLotCU>{ 
        return ParkingLotMU.BIZ_STATUS;
    }
    get TOTAL_NUM(): FieldUtil<ParkingLotCU>{ 
        return ParkingLotMU.TOTAL_NUM;
    }
    get FREE_SPACE_NUM(): FieldUtil<ParkingLotCU>{ 
        return ParkingLotMU.FREE_SPACE_NUM;
    }
}
export {ParkingLotMU, ParkingLotCU}
