This project aim to make a clone of the AirBnB from scratch, in few steps. Please visit https://github.com/Rd-Feng/AirBnB_clone_v2 for continue development.
This console is written in Python3, and will be used to do CRUD operations (Create, Read, Update, Delete) on our AirBnB objects (User, City, Review, etc.). More information on the models will be described in the later section.
At the moment, we have 7 models: BaseModel, User, State, City, Amenity, Place, and Review, each instance of which is given:
- a unique id generated using
uuidpackage - the attribute
created_at, adatetimeobject, indicating when the object is created - the attribute
updated_at, adatetimeobject, indicating when the object is last updated - the attribute
__class__, astrobject, indicating what is the object's type (model)
Other attributes will be given based on the model:
- User
- first_name:
strobject - last_name:
strobject - password:
strobject - email:
str
- first_name:
- State
- name:
strobject
- name:
- City
- state_id:
strobject - name:
strobject
- state_id:
- Amenity
- name:
strobject
- name:
- Place
- city_id:
strobject - user_id:
strobject - name:
strobject - description:
strobject - number_rooms:
intobject - number_bathrooms:
intobject - max_guest:
intobject - price_by_night:
intobject - latitude:
floatobject - longitude:
floatobject - amenity_ids:
listobject
- city_id:
- Review
- place_id:
strobject - user_id:
strobject - text: `str object
- place_id:
Run ./console at the root directory of the repo to start the console
Create an object of type <type>. id of the newly created object will be printed after creation.
Update the attribute attribute name of the object specified by the object id with value attribute value.
Delete an object of type with id object id
Display an of type type with id object id
Display all objects of type type. If type is not specified, display all objects.
Show help information of command. If command is not specified, display all documented commands.
Stephen Chu stephen.chu530@gmail.com
Rui Feng 394@holbertonschool.com