from django.db import models # Create your models here. # diego, Diego1999$ class Facultad(models.Model): fname = models.CharField(max_length=150) class Curso(models.Model): fac_id = models.ForeignKey(Facultad, on_delete=models.CASCADE) name = models.CharField(max_length=150) code = models.CharField(max_length=9) creditos = models.IntegerField(default=0) class Matricula(models.Model): course_id = models.ForeignKey(Curso, on_delete=models.CASCADE) section = models.CharField(max_length=5) prof = models.CharField(max_length=150) grade = models.CharField(max_length=3) class ProximoSemestre(models.Model): course_id = models.ForeignKey(Curso, on_delete=models.CASCADE) section = models.CharField(max_length=5) prof = models.CharField(max_length=150) hours = models.CharField(max_length=50) days = models.CharField(max_length=12) rooms = models.CharField(max_length=100)