Skip to content

Hotel Management — Detailed#

classDiagram
  direction TB

  class Hotel {
    +id
    +name
    +location
    +rooms: List~Room~
    +pricing: PricingPolicy
  }

  class Room {
    +id
    +number
    +type: RoomType
    +rate
    +amenities
    +status: RoomState
  }
  class RoomState {
    <<enumeration>>
    AVAILABLE
    OCCUPIED
    DIRTY
    OUT_OF_SERVICE
  }
  class RoomType {
    <<enumeration>>
    STD
    DELUXE
    SUITE
  }

  class Guest {
    +id
    +name
    +contact
    +loyalty
  }

  class Reservation {
    +id
    +guest
    +room: Room
    +checkin
    +checkout
    +status: ResState
    +totals
    +idempotencyKey
  }
  class ResState {
    <<enumeration>>
    PENDING
    CONFIRMED
    CHECKED_IN
    CHECKED_OUT
    CANCELLED
  }

  class PricingPolicy {
    <<interface>>
    +rate(room, dates) Money
  }
  class FlatNight
  class DynamicPricing

  class PaymentService
  class HousekeepingService
  class ConciergeService

  Hotel *-- Room
  Hotel --> PricingPolicy
  Guest "1" -- "many" Reservation
  Reservation --> Room
  Reservation --> ResState
  Hotel --> PaymentService
  Hotel --> HousekeepingService
  Hotel --> ConciergeService
  PricingPolicy <|.. FlatNight
  PricingPolicy <|.. DynamicPricing
  Room --> RoomState
  Room --> RoomType

Glossary & fundamentals#

Concepts referenced in this design. Each row links to its canonical page; the tag column shows whether it is a high-level (HLD) or low-level (LLD) concept.

Tag Concept What it is Page
HLD Idempotency & retries safe re-execution, backoff + jitter idempotency-retries
HLD Observability metrics, logs, traces, SLOs observability