|
@@ -3,15 +3,18 @@ from django.db import models
|
3
|
3
|
# Create your models here.
|
4
|
4
|
# diego, Diego1999$
|
5
|
5
|
|
|
6
|
+
|
6
|
7
|
class Facultad(models.Model):
|
7
|
8
|
fname = models.CharField(max_length=150)
|
8
|
9
|
|
|
10
|
+
|
9
|
11
|
class Curso(models.Model):
|
10
|
12
|
fac_id = models.ForeignKey(Facultad, on_delete=models.CASCADE)
|
11
|
13
|
name = models.CharField(max_length=150)
|
12
|
14
|
code = models.CharField(max_length=9)
|
13
|
15
|
creditos = models.IntegerField(default=0)
|
14
|
16
|
|
|
17
|
+
|
15
|
18
|
class Matricula(models.Model):
|
16
|
19
|
course_id = models.ForeignKey(Curso, on_delete=models.CASCADE)
|
17
|
20
|
section = models.CharField(max_length=5)
|
|
@@ -21,4 +24,3 @@ class Matricula(models.Model):
|
21
|
24
|
horario = models.CharField(max_length=50)
|
22
|
25
|
dias = models.CharField(max_length=10)
|
23
|
26
|
salon = models.CharField(max_length=12)
|
24
|
|
-
|