Owner: Dev Team | Last Updated: 2026-02-21 | Status: Current
Complete map of Booking data models -- 67 Eloquent models, their fields, and relationships.
Company (1) ──── (N) User [via company_users]
Company (1) ──── (N) Experience [company_id]
Company (1) ──── (N) Channel [via channel_suppliers]
Experience (1) ──── (N) ExperienceMedia
Experience (1) ──── (1) ExperiencePersonnel
Experience (1) ──── (N) ExperiencePricing
Experience (1) ──── (N) ExperienceAvailabilityTimeDate
Experience (1) ──── (1) ExperienceAvailabilityDuration
Experience (1) ──── (1) ExperienceAvailabilityCapacity
Experience (1) ──── (1) ExperienceAvailabilityAgeGroup
Experience (1) ──── (N) ExperienceAdditionalService
Experience (N) ──── (N) Location [via experience_locations]
Experience (N) ──── (N) Channel [via channel_experiences]
Experience (N) ──── (N) BookingFlow [via booking_flow_items]
Experience (N) ──── (N) PRuleAssign [via xp_p_rule_assigns]
Order (1) ──── (1) Customer [customer_id]
Order (1) ──── (N) OrderExperience
Order (1) ──── (1) OrderCoupon
Order (1) ──── (1) OrderGiftCard
Order (1) ──── (N) Payment
Order (1) ──── (1) Invoice
Order (1) ──── (1) Channel [channel_id]
OrderExperience (1) ──── (N) OrderExperienceItem
OrderExperience (1) ──── (1) OrderExperienceSetting
Customer (1) ──── (N) CustomerHistory
Customer (1) ──── (N) Order
Customer (1) ──── (N) GiftCardTransaction [as sender/recipient]
Lead (1) ──── (N) LeadExperience
Lead (1) ──── (N) LeadHistory
Lead (1) ──── (1) User [assigned_id]
Invoice (1) ──── (N) InvoiceLineItem
Invoice (1) ──── (N) InvoiceModifier
Invoice (1) ──── (N) InvoicePayment
PricingRule (1) ──── (N) RuleCondition
PRuleAssign (1) ──── (N) PRuleCondition
PRuleAssign (1) ──── (1) PRulePattern
GiftCard ──extends── Experience [is_gift_card = true]
GiftCard (1) ──── (N) GiftCardDesign
GiftCardTransaction (1) ──── (1) OrderExperience
| Field | Type | Description |
|---|---|---|
uuid |
string | UUID |
name |
string | First name |
surname |
string | Last name |
email |
string | Email (unique) |
phone |
string | Phone |
role |
string | Role (UserRole enum) |
avatar |
string | Avatar URL |
password |
hashed | Password |
status |
boolean | Active / inactive |
Traits: HasApiTokens, HasFactory, Notifiable
| Field | Type | Description |
|---|---|---|
name |
string | Name |
email |
string | |
phone |
string | Phone |
website |
string | Website |
logo |
string | Logo |
mail_config |
EncryptedJson | Mail configuration |
token |
string (hidden) | API token |
api_url |
string | External API URL |
extra |
json | Additional data |
| Field | Type | Description |
|---|---|---|
uuid |
string | UUID |
name |
string | Name |
headline |
string | Short description |
description |
text | Full description |
price |
decimal | Base price |
status |
boolean | Active |
company_id |
FK | Company |
is_gift_card |
boolean | Gift card |
content |
json | Content |
features |
json | Features |
available_prices |
json | Available prices |
external_id |
string | External ID |
external_type |
string | External system type |
Trait: MoneyFormatting
| Field | Type | Description |
|---|---|---|
channel_id |
FK | Sales channel |
customer_id |
FK | Customer |
subtotal_amount |
decimal | Amount before taxes |
tax_amount |
decimal | Tax |
total_amount |
decimal | Total |
transaction_id |
string | Stripe PI ID |
status |
string | Status (OrderStatus) |
Traits: DateFormatting, MoneyFormatting
| Field | Type | Description |
|---|---|---|
name / surname |
string | Full name |
email / phone |
string | Contacts |
stripe_customer_id |
string | Stripe ID |
payment_method_id |
string | Stripe PM |
last_purchase_date |
datetime | Last purchase |
is_newsletter |
boolean | Newsletter subscription |
Trait: SoftDeletes
Order, OrderExperience, OrderExperienceItem, OrderExperienceItemDocument, OrderExperienceSetting, OrderCoupon, OrderGiftCard
Experience, ExperienceMedia, ExperiencePersonnel, ExperiencePricing, ExperiencePricingCategory, ExperienceAvailabilityTimeDate, ExperienceAvailabilityDuration, ExperienceAvailabilityCapacity, ExperienceAvailabilityAgeGroup, ExperienceAdditionalService, ExperienceLocation, ExperienceLocationPricing, ExperienceLocationsAccessory
PricingRule, RuleCondition, PRuleAssign, PRuleCondition, PRulePattern, XpPRuleAssign, PricingCategory, PricingRate
Payment, Refund, Invoice, InvoiceLineItem, InvoiceLineItemModifier, InvoiceModifier, InvoicePayment
GiftCard (extends Experience), GiftCardDesign, GiftCardTransaction, GiftCardsAvailableDesign
Lead, LeadExperience, LeadHistory, LeadScheduleSetting
Channel, ChannelExperience, ChannelSupplier, ChannelManagerExternalBooking
User, Company, CompanyUser, CompanyCoupon
BookingFlow, BookingFlowItem, BookingFlowLog, BookingSetting, Coupon, CrewRole, CustomerHistory, CustomerType, EmailTemplate, Location, ScheduleReport, ServiceExperience
| Trait | Used By | Purpose |
|---|---|---|
DateFormatting |
Order, Invoice, Channel, Coupon | Date formatting for client timezone |
MoneyFormatting |
Order, Payment, Experience, ExperiencePricing | Money amount formatting |
SoftDeletes |
Customer | Soft deletion |
HasApiTokens |
User | Sanctum API tokens |
HasFactory |
User, Invoice, LeadExperience, etc. | Test factories |
| Cast | Purpose |
|---|---|
EncryptedJsonCast |
Encryption of JSON fields (mail_config password) |
EncryptedStringCast |
Encryption of string fields |
| Date | Author | Change |
|---|---|---|
| 2026-02-21 | Documentation Team | Initial creation |
Prev: Data Flow | Next: Security | Up: Architecture