import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { BusParkingLotAttr } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2020-10-19 17:45
 */
interface BusParkingLotAttrCU extends ConditionUtil<BusParkingLotAttrCU>{
    ID:FieldUtil<BusParkingLotAttrCU>;
    LOT_ID:FieldUtil<BusParkingLotAttrCU>;
    ATTR_NAME:FieldUtil<BusParkingLotAttrCU>;
    ATTR_VALUE:FieldUtil<BusParkingLotAttrCU>;
    CREATE_TIME:FieldUtil<BusParkingLotAttrCU>;
    UPDATE_TIME:FieldUtil<BusParkingLotAttrCU>;
}

class BusParkingLotAttrCUImpl extends ConditionUtilImpl<BusParkingLotAttrCUImpl> implements BusParkingLotAttrCU{ 
    newInstance(): BusParkingLotAttrCUImpl {
        return new BusParkingLotAttrCUImpl();
    } 
    get ID(): FieldUtil<BusParkingLotAttrCU>{  
        return new FieldUtil('ID','id','唯一标识', this);
    }
    get LOT_ID(): FieldUtil<BusParkingLotAttrCU>{  
        return new FieldUtil('LOT_ID','lotId','车场ID', this);
    }
    get ATTR_NAME(): FieldUtil<BusParkingLotAttrCU>{  
        return new FieldUtil('ATTR_NAME','attrName','', this);
    }
    get ATTR_VALUE(): FieldUtil<BusParkingLotAttrCU>{  
        return new FieldUtil('ATTR_VALUE','attrValue','', this);
    }
    get CREATE_TIME(): FieldUtil<BusParkingLotAttrCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<BusParkingLotAttrCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
}

@Singleton 
class BusParkingLotAttrMU extends TableUtilImpl<BusParkingLotAttrCU,BusParkingLotAttr>{ 
    tableName  = 'bus_parking_lot_attr';
    tableFields  = ['ID','LOT_ID','attr_name','ATTR_VALUE','CREATE_TIME','UPDATE_TIME'];
    modelFields  = ['id','lotId','attrName','attrValue','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): BusParkingLotAttrCU {
        return new BusParkingLotAttrCUImpl();
    }   

    static get ID(): FieldUtil<BusParkingLotAttrCU>{ 
        return new FieldUtil('ID','id','唯一标识', new BusParkingLotAttrCUImpl());
    }
    static get LOT_ID(): FieldUtil<BusParkingLotAttrCU>{ 
        return new FieldUtil('LOT_ID','lotId','车场ID', new BusParkingLotAttrCUImpl());
    }
    static get ATTR_NAME(): FieldUtil<BusParkingLotAttrCU>{ 
        return new FieldUtil('ATTR_NAME','attrName','', new BusParkingLotAttrCUImpl());
    }
    static get ATTR_VALUE(): FieldUtil<BusParkingLotAttrCU>{ 
        return new FieldUtil('ATTR_VALUE','attrValue','', new BusParkingLotAttrCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<BusParkingLotAttrCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new BusParkingLotAttrCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<BusParkingLotAttrCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new BusParkingLotAttrCUImpl());
    }

    get ID(): FieldUtil<BusParkingLotAttrCU>{ 
        return BusParkingLotAttrMU.ID;
    }
    get LOT_ID(): FieldUtil<BusParkingLotAttrCU>{ 
        return BusParkingLotAttrMU.LOT_ID;
    }
    get ATTR_NAME(): FieldUtil<BusParkingLotAttrCU>{ 
        return BusParkingLotAttrMU.ATTR_NAME;
    }
    get ATTR_VALUE(): FieldUtil<BusParkingLotAttrCU>{ 
        return BusParkingLotAttrMU.ATTR_VALUE;
    }
    get CREATE_TIME(): FieldUtil<BusParkingLotAttrCU>{ 
        return BusParkingLotAttrMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<BusParkingLotAttrCU>{ 
        return BusParkingLotAttrMU.UPDATE_TIME;
    }
}
export {BusParkingLotAttrMU, BusParkingLotAttrCU}
