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

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

@Singleton 
class ParkingLotAttrMU extends TableUtilImpl<ParkingLotAttrCU,ParkingLotAttr>{ 
    tableName  = '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.AutoIncrement;
    joinTables = [];
    subTables = [];

    createConditionUtil(): ParkingLotAttrCU {
        return new ParkingLotAttrCUImpl();
    }   

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

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