Data Models & Schemas

CruiseAppy defines structured data models for all core entities, ensuring data consistency, validation, and seamless integration with external systems. The following are the primary models and their key fields, as implemented in the plugin and described in the technical specification.

Cruise

Field Type Description
id integer Unique cruise identifier
name string Cruise name
ship string Ship name
departure date Departure date
duration integer Duration in nights
itinerary_id integer Linked itinerary
cabins array List of available cabins

Cabin

Field Type Description
id integer Unique cabin identifier
type string Cabin type (e.g., Balcony, Suite)
price decimal Price per person
availability integer Number of available cabins

Itinerary

Field Type Description
id integer Unique itinerary identifier
ports array List of port stops
start_date date Start date
end_date date End date

User

Field Type Description
id integer Unique user identifier
role string User role (Admin, Agent, etc.)
name string Full name
email string Email address
bookings array List of user bookings

Booking

Field Type Description
id integer Unique booking identifier
user_id integer Linked user
cruise_id integer Linked cruise
cabin_id integer Selected cabin
status string Booking status
payment_id integer Linked payment

Payment

Field Type Description
id integer Unique payment identifier
booking_id integer Linked booking
amount decimal Payment amount
status string Payment status
method string Payment method (card, transfer)

Schema Notes

  • All models are validated on both input (API, forms) and output (API responses).
  • Relationships between models (e.g., bookings link users, cruises, cabins, and payments) are enforced by the plugin logic.
  • Schemas are extensible for custom fields or integrations.

For more details, see the API documentation and plugin source code.