components:
  schemas:
    User:
      type: object
      properties:
        id:
          type: integer
        fullName:
          type: string
        email:
          type: string
        role:
          type: string
          enum: [admin, client]
        createdAt:
          type: string
          format: date-time
    
    Car:
      type: object
      properties:
        id:
          type: integer
        brand:
          type: string
        model:
          type: string
        year:
          type: integer
        pricePerDay:
          type: number
        isAvailable:
          type: boolean
        imageUrl:
          type: string

    Hotel:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the hotel.
        isAvailable:
          type: boolean
          description: Indicates if the hotel is available for booking.
        imageUrl:
          type: string
          description: Main image URL of the hotel.
        images:
          type: array
          items:
            type: string
          description: Additional images of the hotel.
        name:
          type: string
          description: Name of the hotel.
        country:
          type: string
          description: Country where the hotel is located.
        city:
          type: string
          description: City where the hotel is located.
        district:
          type: string
          description: District where the hotel is located.
        aproximativeAdresse:
          type: string
          description: Approximate address of the hotel.
        description:
          type: string
          description: Description of the hotel.
        bookingUrl:
          type: string
          description: Booking URL for the hotel.
        onClickCount:
          type: integer
          description: Number of times the hotel has been clicked.
        hasRoomService:
          type: boolean
          description: Indicates if the hotel offers room service.
        hasRestaurant:
          type: boolean
          description: Indicates if the hotel has a restaurant.
        hasBar:
          type: boolean
          description: Indicates if the hotel has a bar.
        hasSpa:
          type: boolean
          description: Indicates if the hotel has a spa.
        hasPool:
          type: boolean
          description: Indicates if the hotel has a pool.
        hasGym:
          type: boolean
          description: Indicates if the hotel has a gym.
        hasParking:
          type: boolean
          description: Indicates if the hotel has parking.
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the hotel was created.
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the hotel was last updated.
    
    Housing:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the housing.
        isAvailable:
          type: boolean
          description: Indicates if the housing is available for booking.
        imageUrl:
          type: string
          description: Main image URL of the housing.
        images:
          type: array
          items:
            type: string
          description: Additional images of the housing.
        name:
          type: string
          description: Name of the housing.
        rooms:
          type: integer
          description: Number of rooms in the housing.
        bathRooms:
          type: integer
          description: Number of bathrooms in the housing.
        pricePerNigth:
          type: number
          format: float
          description: Price per night for the housing.
        country:
          type: string
          description: Country where the housing is located.
        city:
          type: string
          description: City where the housing is located.
        district:
          type: string
          description: District where the housing is located.
        aproximativeAdresse:
          type: string
          description: Approximate address of the housing.
        description:
          type: string
          description: Description of the housing.
        hasWifi:
          type: boolean
          description: Indicates if the housing has Wi-Fi.
        hasTv:
          type: boolean
          description: Indicates if the housing has a TV.
        hasAC:
          type: boolean
          description: Indicates if the housing has air conditioning.
        furnished:
          type: boolean
          description: Indicates if the housing is furnished.
        hasParking:
          type: boolean
          description: Indicates if the housing has parking.
        ownerPhoneNumber:
          type: string
          description: Phone number of the housing owner.
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the housing was created.
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the housing was last updated.
    
    Review:
      type: object
      properties:
        id:
          type: integer
        userId:
          type: integer
        carId:
          type: integer
          nullable: true
        houseId:
          type: integer
          nullable: true
        rating:
          type: integer
          minimum: 1
          maximum: 5
        comment:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time

    Booking:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the booking.
        userId:
          type: integer
          nullable: true
          description: ID of the user who made the booking.
        carId:
          type: integer
          description: ID of the car being booked.
        firstName:
          type: string
          description: First name of the person booking.
        lastName:
          type: string
          description: Last name of the person booking.
        email:
          type: string
          description: Email address of the person booking.
        phone:
          type: string
          description: Phone number of the person booking.
        address:
          type: string
          description: Address of the person booking.
        paymentMethod:
          type: string
          description: Payment method used for the booking.
        startDate:
          type: string
          format: date-time
          description: Start date of the booking.
        endDate:
          type: string
          format: date-time
          description: End date of the booking.
        totalPrice:
          type: number
          format: float
          description: Total price of the booking.
        status:
          type: string
          enum:
            - pending
            - active
            - cancelled
            - completed
          description: Status of the booking.
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the booking was created.
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the booking was last updated.

    HousingBooking:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the housing booking.
        userId:
          type: integer
          nullable: true
          description: ID of the user who made the booking.
        HousingId:
          type: integer
          description: ID of the housing being booked.
        firstName:
          type: string
          description: First name of the person booking.
        lastName:
          type: string
          description: Last name of the person booking.
        email:
          type: string
          description: Email address of the person booking.
        phone:
          type: string
          description: Phone number of the person booking.
        address:
          type: string
          description: Address of the person booking.
        paymentMethod:
          type: string
          description: Payment method used for the booking.
        startDate:
          type: string
          format: date-time
          description: Start date of the booking.
        endDate:
          type: string
          format: date-time
          description: End date of the booking.
        totalPrice:
          type: number
          format: float
          description: Total price of the booking.
        status:
          type: string
          enum:
            - pending
            - active
            - cancelled
            - completed
          description: Status of the booking.
        specialAsk:
          type: string
          nullable: true
          description: Special requests or notes for the booking.
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the booking was created.
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the booking was last updated.

    StatisticsOverview:
      type: object
      properties:
        totalUsers:
          type: integer
        totalCars:
          type: integer
        totalBookings:
          type: integer

    MonthlyStatistics:
      type: object
      properties:
        month:
          type: string
        bookings:
          type: integer

    PopularCar:
      type: object
      properties:
        car:
          $ref: '#/components/schemas/Car'
        timesBooked:
          type: integer