Airbnb-Clone

Tables (16)

Admin

  • admin_id — Integer — Primary key — NOT NULL
  • username — char(50)
  • pw — VARCHAR(255)
  • email — VARCHAR(100)
  • date_joined — DATE
  • last_login — DateTime

Amenity

  • property_id — CHAR(4) — Primary key — NOT NULL
  • amenity_name — VARCHAR(100)

Favorite

  • favorite_id — Integer — Primary key — NOT NULL
  • accomodation_id — Integer — NOT NULL
  • property_id — Integer — NOT NULL
  • date — date

Host

  • host_id — CHAR(4) — Primary key — NOT NULL
  • host_info — VARCHAR(100)
  • host_auth — TINYINT(1)
  • host_sum — VARCHAR(100)
  • host_nic — VARCHAR(7)

Location

  • location_id — Integer — Primary key — NOT NULL
  • property_id — Integer — NOT NULL
  • address — VARCHAR(255)
  • city — VARCHAR(100)
  • state — VARCHAR(100)
  • zip_code — char(20)
  • country — VARCHAR(100)

Message

  • message_id — INT — Primary key — NOT NULL
  • sender_id — INT — NOT NULL
  • reveiver_id — INT — NOT NULL
  • content — VARCHAR(100)
  • Timestamp — DateTime

Payment

  • payment_id — Integer — Foreign key → Property.property_id — NOT NULL
  • reservation_id — CHAR(4) — NOT NULL
  • payment_method — Enum
  • payment_status — Enum
  • payment_date — DateTime

Product

    Property

    • property_id — Integer — Primary key — NOT NULL
    • host_id — Integer — NOT NULL
    • toKnow_id — CHAR(4) — NOT NULL
    • host_name — char(50)
    • name — VARCHAR(20)
    • description — VARCHAR(100)
    • max_guests — int(5)
    • is_accepted — Boolean
    • rate — DECIMAL(1,2)
    • review_count — DECIMAL(1,1)
    • clean_rate — DECIMAL(1,1)
    • communication_rate — DECIMAL(1,1)
    • checkin_rate — DECIMAL(1,1)
    • accuracy_rate — DECIMAL(1,1)
    • location_rate — DECIMAL(1,1)
    • satisfication_rate — DECIMAL(1,1)

    PropertyAmenity

    • property_amenity_id — Integer — Primary key — NOT NULL
    • proporty_id — Integer — NOT NULL
    • property_id — Integer — NOT NULL

    Reservation

    • reservation_id — Integer — Primary key — NOT NULL
    • user_id — Integer — NOT NULL
    • property_id — CHAR(4) — NOT NULL
    • check_in_date — date
    • check_out_date — date
    • number_of_guests — int(5)
    • total_price — decimal(10, 2)
    • reservation_date — DateTime
    • status — char(50)

    Review

    • review_id — Integer — Primary key — NOT NULL
    • user_id — CHAR(4) — NOT NULL
    • reservation_id — CHAR(4) — NOT NULL
    • rate — int(1)
    • content — char(50)
    • date — DATE

    ThingsToKnow

    • toKnow_id — CHAR(4) — Primary key — NOT NULL
    • rule — VARCHAR(100)
    • health_safty — VARCHAR(100)
    • refund_policy — VARCHAR(100)

    Tranport

    • transport_id — Integer — Primary key — NOT NULL
    • property_id — Integer — NOT NULL
    • list — VARCHAR(30)

    Untitled

    • img_id — CHAR(4) — Primary key — NOT NULL
    • property_id — CHAR(4) — NOT NULL
    • main_image — VARCHAR(100)
    • sub_image — VARCHAR(100)

    User

    • user_id — INT — Primary key — NOT NULL
    • username — VARCHAR(50)
    • role — Enum
    • pre_pw — VARCHAR(255)
    • cur_pw — VARCHAR(255)
    • birth — DATE
    • phone_number — char(15)
    • email — VARCHAR(100)
    • datejoined — DateTime
    • service_agreement — Boolean
    • private_policy_agreement — Boolean
    • location_service_agreement — Boolean
    • notification_consent — Boolean