from django.db import models
from django.contrib.auth.models import User
from datetime import date
    
class Balance(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True)
    balanceValue = models.IntegerField(default=0)

class Transaction(models.Model):
    cashier = models.ForeignKey(User, on_delete=models.CASCADE)
    client = models.CharField(max_length=30, blank=True, null=True, default=None, )
    date = models.DateField(default=date.today)
    item = models.CharField(max_length=30, blank=True, null=True, default=None, )

