mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-01-02 03:27:02 -05:00
feat: Implement initial schema and add various API, service, and management command enhancements across the application.
This commit is contained in:
@@ -26,15 +26,9 @@ class Company(TrackedModel):
|
||||
website = models.URLField(blank=True, help_text="Company website URL")
|
||||
|
||||
# Operator-specific fields
|
||||
founded_year = models.PositiveIntegerField(
|
||||
blank=True, null=True, help_text="Year the company was founded"
|
||||
)
|
||||
parks_count = models.IntegerField(
|
||||
default=0, help_text="Number of parks operated (auto-calculated)"
|
||||
)
|
||||
rides_count = models.IntegerField(
|
||||
default=0, help_text="Number of rides manufactured (auto-calculated)"
|
||||
)
|
||||
founded_year = models.PositiveIntegerField(blank=True, null=True, help_text="Year the company was founded")
|
||||
parks_count = models.IntegerField(default=0, help_text="Number of parks operated (auto-calculated)")
|
||||
rides_count = models.IntegerField(default=0, help_text="Number of rides manufactured (auto-calculated)")
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if not self.slug:
|
||||
@@ -72,9 +66,7 @@ class CompanyHeadquarters(models.Model):
|
||||
blank=True,
|
||||
help_text="Mailing address if publicly available",
|
||||
)
|
||||
city = models.CharField(
|
||||
max_length=100, db_index=True, help_text="Headquarters city"
|
||||
)
|
||||
city = models.CharField(max_length=100, db_index=True, help_text="Headquarters city")
|
||||
state_province = models.CharField(
|
||||
max_length=100,
|
||||
blank=True,
|
||||
@@ -87,9 +79,7 @@ class CompanyHeadquarters(models.Model):
|
||||
db_index=True,
|
||||
help_text="Country where headquarters is located",
|
||||
)
|
||||
postal_code = models.CharField(
|
||||
max_length=20, blank=True, help_text="ZIP or postal code"
|
||||
)
|
||||
postal_code = models.CharField(max_length=20, blank=True, help_text="ZIP or postal code")
|
||||
|
||||
# Optional mailing address if different or more complete
|
||||
mailing_address = models.TextField(
|
||||
|
||||
Reference in New Issue
Block a user