[collector] create initial model and migration

This commit is contained in:
bronsen 2025-03-12 22:32:06 +01:00
parent 8cc5d405b4
commit 67bb3e0777
3 changed files with 56 additions and 0 deletions

15
collector/models.py Normal file
View file

@ -0,0 +1,15 @@
from django.db import models
from django_extensions.db.models import ModificationDateTimeField
class Teile(models.Model):
name = models.TextField("Name of the part", null=False, blank=False)
modified = ModificationDateTimeField("last changed")
class Meta:
constraints = [
models.UniqueConstraint(fields=["name"], name="unique_names"),
]
indexes = [
models.Index(fields=["modified"], name="modified"),
]