<reponame>edusantana/ecit-app
from django.db import models

# Create your models here.

class Escola(models.Model):
    nome = models.CharField(max_length=255)
    def __str__(self):
        return self.nome

class Periodo(models.Model):
    escola = models.ForeignKey(Escola, on_delete=models.CASCADE)
    nome = models.CharField(max_length=255)
    ativo = models.BooleanField(default=True)

    def __str__(self):
        return self.nome

from django.db import models

# Create your models here.

class Escola(models.Model):
    nome = models.CharField(max_length=255)
    def __str__(self):
        return self.nome

class Periodo(models.Model):
    escola = models.ForeignKey(Escola, on_delete=models.CASCADE)
    nome = models.CharField(max_length=255)
    ativo = models.BooleanField(default=True)

    def __str__(self):
        return self.nome
# Create your models here.