This commit is contained in:
pacnpal
2026-01-08 13:44:37 -05:00
parent 40cba5bdb2
commit fe960e8b62
21 changed files with 2008 additions and 59 deletions

View File

@@ -22,9 +22,70 @@ class Company(TrackedModel):
)
description = models.TextField(blank=True, help_text="Detailed company description")
website = models.URLField(blank=True, help_text="Company website URL")
# Person/Entity type
PERSON_TYPE_CHOICES = [
("company", "Company"),
("individual", "Individual"),
("firm", "Firm"),
("organization", "Organization"),
]
person_type = models.CharField(
max_length=20,
choices=PERSON_TYPE_CHOICES,
blank=True,
default="company",
help_text="Type of entity (company, individual, firm, organization)",
)
# General company info
founded_date = models.DateField(null=True, blank=True, help_text="Date the company was founded")
founded_date_precision = models.CharField(
max_length=20,
choices=[
("exact", "Exact"),
("month", "Month"),
("year", "Year"),
("decade", "Decade"),
("century", "Century"),
("approximate", "Approximate"),
],
blank=True,
default="",
help_text="Precision of the founded date",
)
founded_year = models.PositiveIntegerField(
null=True,
blank=True,
help_text="Year the company was founded (alternative to founded_date)",
)
headquarters_location = models.CharField(
max_length=200,
blank=True,
help_text="Headquarters location description (e.g., 'Los Angeles, CA, USA')",
)
# Location relationship (optional)
location = models.ForeignKey(
"parks.ParkLocation",
on_delete=models.SET_NULL,
null=True,
blank=True,
related_name="companies",
help_text="Linked location record for headquarters",
)
# Image settings - stored as Cloudflare image IDs/URLs
banner_image_id = models.CharField(
max_length=255,
blank=True,
help_text="Cloudflare image ID for banner image",
)
card_image_id = models.CharField(
max_length=255,
blank=True,
help_text="Cloudflare image ID for card image",
)
# Manufacturer-specific fields
rides_count = models.IntegerField(default=0, help_text="Number of rides manufactured (auto-calculated)")
@@ -33,6 +94,16 @@ class Company(TrackedModel):
# Frontend URL
url = models.URLField(blank=True, help_text="Frontend URL for this company")
# Submission metadata fields (from frontend schema)
source_url = models.URLField(
blank=True,
help_text="Source URL for the data (e.g., official website, Wikipedia)",
)
is_test_data = models.BooleanField(
default=False,
help_text="Whether this is test/development data",
)
def __str__(self):
return self.name