from django.db import models
from sde.models import SDEType


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)
