mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-02-05 07:45:18 -05:00
w
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user