models.py 368 Bytes
Newer Older
1 2 3 4 5 6
from django.db import models
from django.contrib.auth.models import User
from things.models import Thing


class Loan(models.Model):
dani2612's avatar
dani2612 committed
7 8
    borrower = models.ForeignKey(User, null=False,on_delete=models.CASCADE)
    thing = models.ForeignKey(Thing, null=False,on_delete=models.CASCADE)
9 10
    date_out = models.DateTimeField(null=False)
    date_in = models.DateTimeField()