Add comprehensive API documentation for ThrillWiki integration and features

- Introduced Next.js integration guide for ThrillWiki API, detailing authentication, core domain APIs, data structures, and implementation patterns.
- Documented the migration to Rich Choice Objects, highlighting changes for frontend developers and enhanced metadata availability.
- Fixed the missing `get_by_slug` method in the Ride model, ensuring proper functionality of ride detail endpoints.
- Created a test script to verify manufacturer syncing with ride models, ensuring data integrity across related models.
This commit is contained in:
pacnpal
2025-09-16 11:29:17 -04:00
parent 61d73a2147
commit c2c26cfd1d
98 changed files with 11476 additions and 4803 deletions

View File

@@ -14,7 +14,7 @@ Index Strategy:
Performance Target: <100ms for most filter combinations
"""
from django.db import migrations, models
from django.db import migrations
class Migration(migrations.Migration):

View File

@@ -0,0 +1,405 @@
# Generated by Django 5.2.5 on 2025-09-15 17:35
import apps.core.choices.fields
import django.contrib.postgres.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("rides", "0020_add_hybrid_filtering_indexes"),
]
operations = [
migrations.AlterField(
model_name="company",
name="roles",
field=django.contrib.postgres.fields.ArrayField(
base_field=models.CharField(
choices=[
("MANUFACTURER", "Ride Manufacturer"),
("DESIGNER", "Ride Designer"),
],
max_length=20,
),
blank=True,
default=list,
size=None,
),
),
migrations.AlterField(
model_name="companyevent",
name="roles",
field=django.contrib.postgres.fields.ArrayField(
base_field=models.CharField(
choices=[
("MANUFACTURER", "Ride Manufacturer"),
("DESIGNER", "Ride Designer"),
],
max_length=20,
),
blank=True,
default=list,
size=None,
),
),
migrations.AlterField(
model_name="ride",
name="category",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
blank=True,
choice_group="categories",
choices=[
("RC", "Roller Coaster"),
("DR", "Dark Ride"),
("FR", "Flat Ride"),
("WR", "Water Ride"),
("TR", "Transport Ride"),
("OT", "Other"),
],
default="",
domain="rides",
help_text="Ride category classification",
max_length=2,
),
),
migrations.AlterField(
model_name="ride",
name="post_closing_status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
blank=True,
choice_group="post_closing_statuses",
choices=[
("SBNO", "Standing But Not Operating"),
("CLOSED_PERM", "Permanently Closed"),
],
domain="rides",
help_text="Status to change to after closing date",
max_length=20,
null=True,
),
),
migrations.AlterField(
model_name="ride",
name="status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="statuses",
choices=[
("OPERATING", "Operating"),
("CLOSED_TEMP", "Temporarily Closed"),
("SBNO", "Standing But Not Operating"),
("CLOSING", "Closing"),
("CLOSED_PERM", "Permanently Closed"),
("UNDER_CONSTRUCTION", "Under Construction"),
("DEMOLISHED", "Demolished"),
("RELOCATED", "Relocated"),
],
default="OPERATING",
domain="rides",
help_text="Current operational status of the ride",
max_length=20,
),
),
migrations.AlterField(
model_name="rideevent",
name="category",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
blank=True,
choice_group="categories",
choices=[
("RC", "Roller Coaster"),
("DR", "Dark Ride"),
("FR", "Flat Ride"),
("WR", "Water Ride"),
("TR", "Transport Ride"),
("OT", "Other"),
],
default="",
domain="rides",
help_text="Ride category classification",
max_length=2,
),
),
migrations.AlterField(
model_name="rideevent",
name="post_closing_status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
blank=True,
choice_group="post_closing_statuses",
choices=[
("SBNO", "Standing But Not Operating"),
("CLOSED_PERM", "Permanently Closed"),
],
domain="rides",
help_text="Status to change to after closing date",
max_length=20,
null=True,
),
),
migrations.AlterField(
model_name="rideevent",
name="status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="statuses",
choices=[
("OPERATING", "Operating"),
("CLOSED_TEMP", "Temporarily Closed"),
("SBNO", "Standing But Not Operating"),
("CLOSING", "Closing"),
("CLOSED_PERM", "Permanently Closed"),
("UNDER_CONSTRUCTION", "Under Construction"),
("DEMOLISHED", "Demolished"),
("RELOCATED", "Relocated"),
],
default="OPERATING",
domain="rides",
help_text="Current operational status of the ride",
max_length=20,
),
),
migrations.AlterField(
model_name="ridemodel",
name="category",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
blank=True,
choice_group="categories",
choices=[
("RC", "Roller Coaster"),
("DR", "Dark Ride"),
("FR", "Flat Ride"),
("WR", "Water Ride"),
("TR", "Transport Ride"),
("OT", "Other"),
],
default="",
domain="rides",
help_text="Primary category classification",
max_length=2,
),
),
migrations.AlterField(
model_name="ridemodel",
name="target_market",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
blank=True,
choice_group="target_markets",
choices=[
("FAMILY", "Family"),
("THRILL", "Thrill"),
("EXTREME", "Extreme"),
("KIDDIE", "Kiddie"),
("ALL_AGES", "All Ages"),
],
domain="rides",
help_text="Primary target market for this ride model",
max_length=50,
),
),
migrations.AlterField(
model_name="ridemodelevent",
name="category",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
blank=True,
choice_group="categories",
choices=[
("RC", "Roller Coaster"),
("DR", "Dark Ride"),
("FR", "Flat Ride"),
("WR", "Water Ride"),
("TR", "Transport Ride"),
("OT", "Other"),
],
default="",
domain="rides",
help_text="Primary category classification",
max_length=2,
),
),
migrations.AlterField(
model_name="ridemodelevent",
name="target_market",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
blank=True,
choice_group="target_markets",
choices=[
("FAMILY", "Family"),
("THRILL", "Thrill"),
("EXTREME", "Extreme"),
("KIDDIE", "Kiddie"),
("ALL_AGES", "All Ages"),
],
domain="rides",
help_text="Primary target market for this ride model",
max_length=50,
),
),
migrations.AlterField(
model_name="ridephoto",
name="photo_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="photo_types",
choices=[
("exterior", "Exterior View"),
("queue", "Queue Area"),
("station", "Station"),
("onride", "On-Ride"),
("construction", "Construction"),
("other", "Other"),
],
default="exterior",
domain="rides",
help_text="Type of photo for categorization and display purposes",
max_length=50,
),
),
migrations.AlterField(
model_name="ridephotoevent",
name="photo_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="photo_types",
choices=[
("exterior", "Exterior View"),
("queue", "Queue Area"),
("station", "Station"),
("onride", "On-Ride"),
("construction", "Construction"),
("other", "Other"),
],
default="exterior",
domain="rides",
help_text="Type of photo for categorization and display purposes",
max_length=50,
),
),
migrations.AlterField(
model_name="rollercoasterstats",
name="launch_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="launch_systems",
choices=[
("CHAIN", "Chain Lift"),
("LSM", "LSM Launch"),
("HYDRAULIC", "Hydraulic Launch"),
("GRAVITY", "Gravity"),
("OTHER", "Other"),
],
default="CHAIN",
domain="rides",
help_text="Launch or lift system type",
max_length=20,
),
),
migrations.AlterField(
model_name="rollercoasterstats",
name="roller_coaster_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
blank=True,
choice_group="coaster_types",
choices=[
("SITDOWN", "Sit Down"),
("INVERTED", "Inverted"),
("FLYING", "Flying"),
("STANDUP", "Stand Up"),
("WING", "Wing"),
("DIVE", "Dive"),
("FAMILY", "Family"),
("WILD_MOUSE", "Wild Mouse"),
("SPINNING", "Spinning"),
("FOURTH_DIMENSION", "4th Dimension"),
("OTHER", "Other"),
],
default="SITDOWN",
domain="rides",
help_text="Roller coaster type classification",
max_length=20,
),
),
migrations.AlterField(
model_name="rollercoasterstats",
name="track_material",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
blank=True,
choice_group="track_materials",
choices=[("STEEL", "Steel"), ("WOOD", "Wood"), ("HYBRID", "Hybrid")],
default="STEEL",
domain="rides",
help_text="Track construction material type",
max_length=20,
),
),
migrations.AlterField(
model_name="rollercoasterstatsevent",
name="launch_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="launch_systems",
choices=[
("CHAIN", "Chain Lift"),
("LSM", "LSM Launch"),
("HYDRAULIC", "Hydraulic Launch"),
("GRAVITY", "Gravity"),
("OTHER", "Other"),
],
default="CHAIN",
domain="rides",
help_text="Launch or lift system type",
max_length=20,
),
),
migrations.AlterField(
model_name="rollercoasterstatsevent",
name="roller_coaster_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
blank=True,
choice_group="coaster_types",
choices=[
("SITDOWN", "Sit Down"),
("INVERTED", "Inverted"),
("FLYING", "Flying"),
("STANDUP", "Stand Up"),
("WING", "Wing"),
("DIVE", "Dive"),
("FAMILY", "Family"),
("WILD_MOUSE", "Wild Mouse"),
("SPINNING", "Spinning"),
("FOURTH_DIMENSION", "4th Dimension"),
("OTHER", "Other"),
],
default="SITDOWN",
domain="rides",
help_text="Roller coaster type classification",
max_length=20,
),
),
migrations.AlterField(
model_name="rollercoasterstatsevent",
name="track_material",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
blank=True,
choice_group="track_materials",
choices=[("STEEL", "Steel"), ("WOOD", "Wood"), ("HYBRID", "Hybrid")],
default="STEEL",
domain="rides",
help_text="Track construction material type",
max_length=20,
),
),
]

View File

@@ -0,0 +1,53 @@
# Generated by Django 5.2.5 on 2025-09-15 18:07
import apps.core.choices.fields
import django.contrib.postgres.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("rides", "0021_alter_company_roles_alter_companyevent_roles_and_more"),
]
operations = [
migrations.AlterField(
model_name="company",
name="roles",
field=django.contrib.postgres.fields.ArrayField(
base_field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="company_roles",
choices=[
("MANUFACTURER", "Ride Manufacturer"),
("DESIGNER", "Ride Designer"),
],
domain="rides",
max_length=20,
),
blank=True,
default=list,
size=None,
),
),
migrations.AlterField(
model_name="companyevent",
name="roles",
field=django.contrib.postgres.fields.ArrayField(
base_field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="company_roles",
choices=[
("MANUFACTURER", "Ride Manufacturer"),
("DESIGNER", "Ride Designer"),
],
domain="rides",
max_length=20,
),
blank=True,
default=list,
size=None,
),
),
]

View File

@@ -0,0 +1,94 @@
# Generated by Django 5.2.5 on 2025-09-15 19:06
import apps.core.choices.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("rides", "0022_alter_company_roles_alter_companyevent_roles"),
]
operations = [
migrations.AlterField(
model_name="ridemodelphoto",
name="photo_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="photo_types",
choices=[
("PROMOTIONAL", "Promotional"),
("TECHNICAL", "Technical Drawing"),
("INSTALLATION", "Installation Example"),
("RENDERING", "3D Rendering"),
("CATALOG", "Catalog Image"),
],
default="PROMOTIONAL",
domain="rides",
help_text="Type of photo for categorization and display purposes",
max_length=20,
),
),
migrations.AlterField(
model_name="ridemodelphotoevent",
name="photo_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="photo_types",
choices=[
("PROMOTIONAL", "Promotional"),
("TECHNICAL", "Technical Drawing"),
("INSTALLATION", "Installation Example"),
("RENDERING", "3D Rendering"),
("CATALOG", "Catalog Image"),
],
default="PROMOTIONAL",
domain="rides",
help_text="Type of photo for categorization and display purposes",
max_length=20,
),
),
migrations.AlterField(
model_name="ridemodeltechnicalspec",
name="spec_category",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="spec_categories",
choices=[
("DIMENSIONS", "Dimensions"),
("PERFORMANCE", "Performance"),
("CAPACITY", "Capacity"),
("SAFETY", "Safety Features"),
("ELECTRICAL", "Electrical Requirements"),
("FOUNDATION", "Foundation Requirements"),
("MAINTENANCE", "Maintenance"),
("OTHER", "Other"),
],
domain="rides",
help_text="Category of technical specification",
max_length=50,
),
),
migrations.AlterField(
model_name="ridemodeltechnicalspecevent",
name="spec_category",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="spec_categories",
choices=[
("DIMENSIONS", "Dimensions"),
("PERFORMANCE", "Performance"),
("CAPACITY", "Capacity"),
("SAFETY", "Safety Features"),
("ELECTRICAL", "Electrical Requirements"),
("FOUNDATION", "Foundation Requirements"),
("MAINTENANCE", "Maintenance"),
("OTHER", "Other"),
],
domain="rides",
help_text="Category of technical specification",
max_length=50,
),
),
]