mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 12:11:13 -05:00
18 lines
618 B
Python
18 lines
618 B
Python
from django.db import models
|
|
from django.urls import reverse
|
|
from django.utils.text import slugify
|
|
from typing import Tuple, Any
|
|
import pghistory
|
|
|
|
from core.history import TrackedModel
|
|
from .parks import Park
|
|
|
|
@pghistory.track()
|
|
class ParkArea(TrackedModel):
|
|
id: int # Type hint for Django's automatic id field
|
|
park = models.ForeignKey(Park, on_delete=models.CASCADE, related_name="areas")
|
|
name = models.CharField(max_length=255)
|
|
slug = models.SlugField(max_length=255)
|
|
description = models.TextField(blank=True)
|
|
opening_date = models.DateField(null=True, blank=True)
|
|
closing_date = models |