Things added, WIP
Some checks are pending
SonarQube Scan / SonarQube Trigger (push) Waiting to run
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/labhelper) (push) Successful in 7s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/labhelper-data-loader) (push) Successful in 7s

This commit is contained in:
2025-12-28 20:20:57 +01:00
parent fe3b1f00ba
commit ac6bd2f666
9 changed files with 101 additions and 4 deletions

View File

@@ -35,3 +35,39 @@ class Box(models.Model):
def __str__(self):
return self.id
class ThingType(models.Model):
"""A type/category for things stored in boxes."""
name = models.CharField(max_length=255, unique=True)
class Meta:
ordering = ['name']
def __str__(self):
return self.name
class Thing(models.Model):
"""An item stored in a box."""
name = models.CharField(max_length=255)
thing_type = models.ForeignKey(
ThingType,
on_delete=models.PROTECT,
related_name='things'
)
box = models.ForeignKey(
Box,
on_delete=models.PROTECT,
related_name='things'
)
description = models.TextField(blank=True)
picture = models.ImageField(upload_to='things/', blank=True)
class Meta:
ordering = ['name']
def __str__(self):
return self.name