from django.db import models

# Create your models here.
class User(models.Model):
    userid=models.CharField(max_length=10, primary_key=True)
    username=models.CharField(max_length=50)
    email=models.CharField(max_length=50)
    password=models.CharField(max_length=20)
    pnumber=models.CharField(max_length=20)
    
    def __str__(self):
        return self.userid

class Sales(models.Model):
    userid = models.ForeignKey(User, on_delete=models.CASCADE)
    amt=models.IntegerField()
    item= models.CharField(max_length=100)
    quantity = models.CharField(max_length=10)
    created=models.DateTimeField(auto_now_add=True)
    

     
  



























































































































































































































































  