from django.db import models
from django.core.validators import FileExtensionValidator

# Create your models here.
class Histology(models.Model):
        name = models.CharField(max_length=255) #name for histology image
        description = models.TextField(blank=True, null=True) #description for item, uses textfield because its longer, blank=true and null=true are there if the user doesnt want a description
        histologyImage = models.FileField(upload_to='data_files/histologyGallery', blank=True, null=True, validators=[FileExtensionValidator(['png','jpeg','jpg'])])
        subtitle = models.CharField(max_length=255, blank = True)
        def __str__(self):
            return self.name