Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Report(models.Model):
- client = models.ForeignKey(Client, on_delete=models.CASCADE, null=True, blank=True)
- result_doc = models.FileField(upload_to="lab_result_doc/%Y/%m/%d", null=True, blank=True)
- date_of_loss = models.DateTimeField(null=True, blank=True)
- date_of_inspection = models.DateTimeField(null=True, blank=True)
- report_date = models.DateTimeField(null=True, blank=True)
- inspector = models.ForeignKey(Inspector, on_delete=models.CASCADE, null=True, blank=True)
- license = models.CharField(max_length=100, null=True, blank=True)
- observations = models.CharField(max_length=100, choices=OBSERVATION_CHOICES, blank=True, null=True)
- report_sample = models.ManyToManyField('ReportSample', verbose_name='samples')
- class ReportSample(models.Model):
- serial = models.CharField(max_length=200)
- location = models.CharField(max_length=200)
- results = models.CharField(max_length=200, null=True, blank=True)
- analysis = models.ForeignKey(SampleType, on_delete=models.CASCADE)
- upload_picture = models.FileField(upload_to="sample/%Y/%m/%d")
- picture_title = models.CharField(max_length=200
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement