add redis cache, Acquisition & django-esi

This commit is contained in:
2023-10-29 12:12:25 +01:00
parent f92d518468
commit f860a5bf1d
10 changed files with 95 additions and 54 deletions

View File

@@ -1,2 +1,15 @@
from django.db import models
from sde.models import SDEType
# models
class Acquisition(models.Model):
type = models.ForeignKey(SDEType, related_name="acquisitions", on_delete=models.CASCADE)
quantity = models.IntegerField()
remaining = models.IntegerField()
price = models.FloatField()
date = models.DateTimeField(auto_now_add=True)
source = models.CharField(max_length=255)
user = models.ForeignKey("auth.User", related_name="acquisitions", on_delete=models.CASCADE)