VoiceAssist / api /models.py
thejagstudio's picture
Upload 243 files
2e53f8d verified
from django.db import models
# Create your models here.
class FabricBatch(models.Model):
GRN = models.CharField(max_length=100, unique=True)
supplierName = models.CharField(max_length=100, null=True, blank=True)
buyer = models.CharField(max_length=100, null=True, blank=True)
quantity = models.CharField(max_length=100, null=True, blank=True)
fabricDescription = models.CharField(max_length=500, null=True, blank=True)
itemDescription = models.CharField(max_length=500, null=True, blank=True)
fabricForm = models.CharField(max_length=100, null=True, blank=True)
POWidth = models.FloatField(null=True, blank=True)
POUOM = models.CharField(max_length=100, null=True, blank=True)
PointsUOM = models.CharField(max_length=100, null=True, blank=True)
Tolarence = models.IntegerField(null=True, blank=True)
color = models.CharField(max_length=100, null=True, blank=True)
supplier = models.CharField(max_length=100, null=True, blank=True)
item = models.CharField(max_length=100, null=True, blank=True)
PCH = models.CharField(max_length=100, null=True, blank=True)
invoice = models.IntegerField(null=True, blank=True)
fabricOdour = models.CharField(max_length=100, null=True, blank=True)
PO = models.IntegerField( null=True, blank=True)
basicUOM = models.CharField(max_length=100, null=True, blank=True)
Warehouse = models.IntegerField(null=True, blank=True)
convFactor = models.IntegerField(null=True, blank=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
def __str__(self):
return self.GRN
class FabriRoll(models.Model):
name = models.CharField(max_length=100, unique=True)
GRN = models.ForeignKey(FabricBatch, on_delete=models.CASCADE, null=True, blank=True)
rLength = models.FloatField(null=True, blank=True)
aLength = models.FloatField(null=True, blank=True)
minWidth = models.FloatField(null=True, blank=True)
maxWidth = models.FloatField(null=True, blank=True)
CS = models.CharField(max_length=20, null=True, blank=True)
LWV = models.CharField(max_length=20, null=True, blank=True)
EPI = models.FloatField(null=True, blank=True)
PPI = models.FloatField(null=True, blank=True)
CutPcs = models.FloatField(null=True, blank=True)
sWarp = models.FloatField(null=True, blank=True)
sWeft = models.FloatField(null=True, blank=True)
GSM = models.FloatField(null=True, blank=True)
SL = models.FloatField(null=True, blank=True)
SG = models.FloatField(null=True, blank=True)
Bowing = models.FloatField(null=True, blank=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
def __str__(self):
return self.name