Created
September 28, 2018 14:39
-
-
Save daviwesley/86ddf276db147ba2281a28ba2111436e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
# Create your models here. | |
class Subject(models.Model): | |
name = models.CharField(max_length=40) | |
hours = models.IntegerField() | |
credits = models.IntegerField() | |
class Student(models.Model): | |
name = models.CharField(max_length=55) | |
id_subscription = models.IntegerField(primary_key=True) | |
subject = models.ManyToManyField(Subject) | |
class Situation(models.Model): | |
SITUACAO = ( | |
('REP', 'Reprovado por falta'), | |
('ATV', 'Ativo'), | |
) | |
sit = models.CharField(max_length=30, choices=SITUACAO, default=ATV) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment