Add nickname field to assets

So we can stop storing nicknames in the sodding serial number
This commit is contained in:
2020-03-02 17:53:39 +00:00
parent 2b0aa3e673
commit 805f573b7d
3 changed files with 26 additions and 0 deletions

View File

@@ -82,6 +82,7 @@ class Asset(models.Model, RevisionMixin):
category = models.ForeignKey(to=AssetCategory, on_delete=models.CASCADE)
status = models.ForeignKey(to=AssetStatus, on_delete=models.CASCADE)
serial_number = models.CharField(max_length=150, blank=True)
nickname = models.CharField(max_length=20, blank=True, unique=True)
purchased_from = models.ForeignKey(to=Supplier, on_delete=models.CASCADE, blank=True, null=True, related_name="assets")
date_acquired = models.DateField()
date_sold = models.DateField(blank=True, null=True)