Skip to content
Draft

Large diffs are not rendered by default.

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions app/Swagger/Models/SummitAbstractLocationSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

namespace App\Swagger\Models;

use OpenApi\Attributes as OA;

/**
* Schema for SummitAbstractLocation model
* Base schema for all location types
*/
#[OA\Schema(
schema: 'SummitAbstractLocation',
type: 'object',
description: 'Base location object for summits',
properties: [
new OA\Property(property: 'id', type: 'integer', description: 'Unique identifier'),
new OA\Property(property: 'created', type: 'integer', description: 'Creation timestamp (epoch)'),
new OA\Property(property: 'last_edited', type: 'integer', description: 'Last modification timestamp (epoch)'),
new OA\Property(property: 'name', type: 'string', description: 'Location name'),
new OA\Property(property: 'short_name', type: 'string', description: 'Short name for the location'),
new OA\Property(property: 'description', type: 'string', description: 'Location description'),
new OA\Property(property: 'location_type', type: 'string', description: 'Type of location'),
new OA\Property(property: 'order', type: 'integer', description: 'Display order'),
new OA\Property(property: 'opening_hour', type: 'integer', description: 'Opening hour (0-23)'),
new OA\Property(property: 'closing_hour', type: 'integer', description: 'Closing hour (0-23)'),
new OA\Property(property: 'class_name', type: 'string', description: 'Class name identifier'),
new OA\Property(
property: 'published_events',
type: 'array',
items: new OA\Items(type: 'integer'),
description: 'Array of published event IDs at this location'
),
]
)]
class SummitAbstractLocationSchema {}
25 changes: 25 additions & 0 deletions app/Swagger/Models/SummitAirportSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace App\Swagger\Models;

use OpenApi\Attributes as OA;

/**
* Schema for SummitAirport model
* Extends SummitExternalLocation with airport-specific properties
*/
#[OA\Schema(
schema: 'SummitAirport',
type: 'object',
description: 'Summit airport',
allOf: [
new OA\Schema(ref: '#/components/schemas/SummitExternalLocation'),
new OA\Schema(
type: 'object',
properties: [
new OA\Property(property: 'airport_type', type: 'string', description: 'Type of airport (Primary, Alternate)'),
]
)
]
)]
class SummitAirportSchema {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,6 @@
* Schemas for SummitBookableVenueRoomAttributeValue entities
*/

#[OA\Schema(
schema: 'SummitBookableVenueRoomAttributeValue',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1, description: 'Attribute value ID'),
new OA\Property(property: 'created', type: 'integer', example: 1630500518, description: 'Creation timestamp (Unix)'),
new OA\Property(property: 'last_edited', type: 'integer', example: 1630500518, description: 'Last edit timestamp (Unix)'),
new OA\Property(property: 'value', type: 'string', example: 'Large', description: 'The attribute value text'),
new OA\Property(property: 'type_id', type: 'integer', example: 1, description: 'Associated attribute type ID'),
]
)]
class SummitBookableVenueRoomAttributeValueSchema {}

#[OA\Schema(
schema: 'SummitBookableVenueRoomAttributeValueExpanded',
type: 'object',
Expand All @@ -37,3 +24,4 @@ class SummitBookableVenueRoomAttributeValueSchema {}
]
)]
class SummitBookableVenueRoomAttributeValueExpandedSchema {}

22 changes: 22 additions & 0 deletions app/Swagger/Models/SummitBookableVenueRoomAttributeValueSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace App\Swagger\Models;

use OpenApi\Attributes as OA;

/**
* Schema for SummitBookableVenueRoomAttributeValue model
*/
#[OA\Schema(
schema: 'SummitBookableVenueRoomAttributeValue',
type: 'object',
description: 'Bookable venue room attribute value',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1, description: 'Attribute value ID'),
new OA\Property(property: 'created', type: 'integer', example: 1630500518, description: 'Creation timestamp (Unix)'),
new OA\Property(property: 'last_edited', type: 'integer', example: 1630500518, description: 'Last edit timestamp (Unix)'),
new OA\Property(property: 'value', type: 'string', example: 'Large', description: 'The attribute value text'),
new OA\Property(property: 'type_id', type: 'integer', example: 1, description: 'Associated attribute type ID'),
]
)]
class SummitBookableVenueRoomAttributeValueSchema {}
32 changes: 32 additions & 0 deletions app/Swagger/Models/SummitBookableVenueRoomSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace App\Swagger\Models;

use OpenApi\Attributes as OA;

/**
* Schema for SummitBookableVenueRoom model
* Extends SummitVenueRoom with booking-specific properties
*/
#[OA\Schema(
schema: 'SummitBookableVenueRoom',
type: 'object',
description: 'Summit bookable venue room',
allOf: [
new OA\Schema(ref: '#/components/schemas/SummitVenueRoom'),
new OA\Schema(
type: 'object',
properties: [
new OA\Property(property: 'time_slot_cost', type: 'number', format: 'float', description: 'Cost per time slot'),
new OA\Property(property: 'currency', type: 'string', description: 'Currency code (e.g., USD)'),
new OA\Property(
property: 'attribute_values',
type: 'array',
items: new OA\Items(ref: '#/components/schemas/SummitBookableVenueRoomAttributeValue'),
description: 'Attribute values for this room'
),
]
)
]
)]
class SummitBookableVenueRoomSchema {}
25 changes: 25 additions & 0 deletions app/Swagger/Models/SummitExternalLocationSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace App\Swagger\Models;

use OpenApi\Attributes as OA;

/**
* Schema for SummitExternalLocation model
* Extends SummitGeoLocatedLocation with external location-specific properties
*/
#[OA\Schema(
schema: 'SummitExternalLocation',
type: 'object',
description: 'Summit external location',
allOf: [
new OA\Schema(ref: '#/components/schemas/SummitGeoLocatedLocation'),
new OA\Schema(
type: 'object',
properties: [
new OA\Property(property: 'capacity', type: 'integer', description: 'Location capacity'),
]
)
]
)]
class SummitExternalLocationSchema {}
48 changes: 48 additions & 0 deletions app/Swagger/Models/SummitGeoLocatedLocationSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

namespace App\Swagger\Models;

use OpenApi\Attributes as OA;

/**
* Schema for SummitGeoLocatedLocation model
* Extends SummitAbstractLocation with geographic properties
*/
#[OA\Schema(
schema: 'SummitGeoLocatedLocation',
type: 'object',
description: 'Geo-located summit location with address and coordinates',
allOf: [
new OA\Schema(ref: '#/components/schemas/SummitAbstractLocation'),
new OA\Schema(
type: 'object',
properties: [
new OA\Property(property: 'address_1', type: 'string', description: 'Primary address line'),
new OA\Property(property: 'address_2', type: 'string', description: 'Secondary address line'),
new OA\Property(property: 'zip_code', type: 'string', description: 'ZIP/Postal code'),
new OA\Property(property: 'city', type: 'string', description: 'City name'),
new OA\Property(property: 'state', type: 'string', description: 'State/Province'),
new OA\Property(property: 'country', type: 'string', description: 'Country'),
new OA\Property(property: 'lng', type: 'number', format: 'float', description: 'Longitude coordinate'),
new OA\Property(property: 'lat', type: 'number', format: 'float', description: 'Latitude coordinate'),
new OA\Property(property: 'website_url', type: 'string', format: 'uri', description: 'Website URL'),
new OA\Property(property: 'display_on_site', type: 'boolean', description: 'Whether to display on public site'),
new OA\Property(property: 'details_page', type: 'boolean', description: 'Whether to show details page'),
new OA\Property(property: 'location_message', type: 'string', description: 'Custom message for this location'),
new OA\Property(
property: 'maps',
type: 'array',
items: new OA\Items(type: 'integer'),
description: 'Array of map IDs'
),
new OA\Property(
property: 'images',
type: 'array',
items: new OA\Items(type: 'integer'),
description: 'Array of image IDs'
),
]
)
]
)]
class SummitGeoLocatedLocationSchema {}
27 changes: 27 additions & 0 deletions app/Swagger/Models/SummitHotelSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace App\Swagger\Models;

use OpenApi\Attributes as OA;

/**
* Schema for SummitHotel model
* Extends SummitExternalLocation with hotel-specific properties
*/
#[OA\Schema(
schema: 'SummitHotel',
type: 'object',
description: 'Summit hotel',
allOf: [
new OA\Schema(ref: '#/components/schemas/SummitExternalLocation'),
new OA\Schema(
type: 'object',
properties: [
new OA\Property(property: 'booking_link', type: 'string', format: 'uri', description: 'Booking URL'),
new OA\Property(property: 'hotel_type', type: 'string', description: 'Type of hotel (Primary, Alternate)'),
new OA\Property(property: 'sold_out', type: 'boolean', description: 'Whether the hotel is sold out'),
]
)
]
)]
class SummitHotelSchema {}
26 changes: 26 additions & 0 deletions app/Swagger/Models/SummitLocationBannerSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace App\Swagger\Models;

use OpenApi\Attributes as OA;

/**
* Schema for SummitLocationBanner model
*/
#[OA\Schema(
schema: 'SummitLocationBanner',
type: 'object',
description: 'Summit location banner',
properties: [
new OA\Property(property: 'id', type: 'integer', description: 'Unique identifier'),
new OA\Property(property: 'created', type: 'integer', format: 'int64', description: 'Creation timestamp (epoch)'),
new OA\Property(property: 'last_edited', type: 'integer', format: 'int64', description: 'Last modification timestamp (epoch)'),
new OA\Property(property: 'title', type: 'string', description: 'Banner title'),
new OA\Property(property: 'content', type: 'string', description: 'Banner content/message'),
new OA\Property(property: 'type', type: 'string', description: 'Banner type (Primary, Secondary)'),
new OA\Property(property: 'enabled', type: 'boolean', description: 'Whether the banner is enabled'),
new OA\Property(property: 'location_id', type: 'integer', description: 'ID of the parent location'),
new OA\Property(property: 'class_name', type: 'string', description: 'Class type'),
]
)]
class SummitLocationBannerSchema {}
26 changes: 26 additions & 0 deletions app/Swagger/Models/SummitLocationImageSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace App\Swagger\Models;

use OpenApi\Attributes as OA;

/**
* Schema for SummitLocationImage model
*/
#[OA\Schema(
schema: 'SummitLocationImage',
type: 'object',
description: 'Summit location image',
properties: [
new OA\Property(property: 'id', type: 'integer', description: 'Unique identifier'),
new OA\Property(property: 'created', type: 'integer', format: 'int64', description: 'Creation timestamp (epoch)'),
new OA\Property(property: 'last_edited', type: 'integer', format: 'int64', description: 'Last modification timestamp (epoch)'),
new OA\Property(property: 'name', type: 'string', description: 'Image name'),
new OA\Property(property: 'description', type: 'string', description: 'Image description'),
new OA\Property(property: 'class_name', type: 'string', description: 'Class type'),
new OA\Property(property: 'location_id', type: 'integer', description: 'ID of the parent location'),
new OA\Property(property: 'order', type: 'integer', description: 'Display order'),
new OA\Property(property: 'image_url', type: 'string', format: 'uri', description: 'URL of the image'),
]
)]
class SummitLocationImageSchema {}
26 changes: 26 additions & 0 deletions app/Swagger/Models/SummitLocationMapSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace App\Swagger\Models;

use OpenApi\Attributes as OA;

/**
* Schema for SummitLocationMap model
*/
#[OA\Schema(
schema: 'SummitLocationMap',
type: 'object',
description: 'Summit location map',
properties: [
new OA\Property(property: 'id', type: 'integer', description: 'Unique identifier'),
new OA\Property(property: 'created', type: 'integer', format: 'int64', description: 'Creation timestamp (epoch)'),
new OA\Property(property: 'last_edited', type: 'integer', format: 'int64', description: 'Last modification timestamp (epoch)'),
new OA\Property(property: 'name', type: 'string', description: 'Map name'),
new OA\Property(property: 'description', type: 'string', description: 'Map description'),
new OA\Property(property: 'class_name', type: 'string', description: 'Class type'),
new OA\Property(property: 'location_id', type: 'integer', description: 'ID of the parent location'),
new OA\Property(property: 'order', type: 'integer', description: 'Display order'),
new OA\Property(property: 'image_url', type: 'string', format: 'uri', description: 'URL of the map image'),
]
)]
class SummitLocationMapSchema {}
47 changes: 47 additions & 0 deletions app/Swagger/Models/SummitRoomReservationSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

namespace App\Swagger\Models;

use OpenApi\Attributes as OA;

/**
* Schema for SummitRoomReservation model
*/
#[OA\Schema(
schema: 'SummitRoomReservation',
type: 'object',
description: 'Summit room reservation',
properties: [
new OA\Property(property: 'id', type: 'integer', description: 'Unique identifier'),
new OA\Property(property: 'created', type: 'integer', format: 'int64', description: 'Creation timestamp (epoch)'),
new OA\Property(property: 'last_edited', type: 'integer', format: 'int64', description: 'Last modification timestamp (epoch)'),
new OA\Property(property: 'room_id', type: 'integer', description: 'ID of the booked room'),
new OA\Property(property: 'owner_id', type: 'integer', description: 'ID of the reservation owner'),
new OA\Property(property: 'summit_id', type: 'integer', description: 'ID of the summit'),
new OA\Property(property: 'amount', type: 'number', format: 'float', description: 'Total reservation amount'),
new OA\Property(property: 'refunded_amount', type: 'number', format: 'float', description: 'Refunded amount'),
new OA\Property(property: 'currency', type: 'string', description: 'Currency code (e.g., USD)'),
new OA\Property(property: 'status', type: 'string', description: 'Reservation status (Reserved, Error, Paid, RequestedRefund, Refunded, Canceled)'),
new OA\Property(property: 'payment_gateway_cart_id', type: 'string', description: 'Payment gateway cart ID'),
new OA\Property(property: 'payment_gateway_client_token', type: 'string', description: 'Payment gateway client token'),
new OA\Property(property: 'start_datetime', type: 'integer', format: 'int64', description: 'Reservation start timestamp (epoch)'),
new OA\Property(property: 'end_datetime', type: 'integer', format: 'int64', description: 'Reservation end timestamp (epoch)'),
new OA\Property(property: 'local_start_datetime', type: 'string', format: 'date-time', description: 'Local start datetime'),
new OA\Property(property: 'local_end_datetime', type: 'string', format: 'date-time', description: 'Local end datetime'),
new OA\Property(property: 'approved_payment_date', type: 'integer', format: 'int64', nullable: true, description: 'Approved payment timestamp (epoch)'),
new OA\Property(property: 'last_error', type: 'string', nullable: true, description: 'Last error message'),
new OA\Property(
property: 'owner',
ref: '#/components/schemas/Member',
nullable: true,
description: 'Reservation owner'
),
new OA\Property(
property: 'room',
ref: '#/components/schemas/SummitBookableVenueRoom',
nullable: true,
description: 'Booked room'
),
]
)]
class SummitRoomReservationSchema {}
Loading