Commit babce02f49d7d5cd6750ee22b406fe61d5c732a1
Exists in
master
merging models.py
Showing 2 changed files Side-by-side Diff
flashy/flashcards/models.py
View file @
babce02
... | ... | @@ -2,12 +2,27 @@ |
2 | 2 | |
3 | 3 | # Create your models here. |
4 | 4 | class Flashcard(models.Model): |
5 | - text = models.CharField(max_length=255) | |
6 | - class = models.ForeignKey(Class) | |
7 | - pushed = models.DateTimeField() | |
8 | - material_date = models.DateTimeField() | |
9 | - previous = ForeignKey(Flashcard) | |
10 | - author = ForeignKey(User) | |
11 | - hidden = CharField(null=True, max_length=255) | |
12 | - mask = ForeignKey(FlashcardMask) | |
5 | + text = models.CharField(max_length=255) | |
6 | + class = models.ForeignKey(Class) | |
7 | + pushed = models.DateTimeField() | |
8 | + material_date = models.DateTimeField() | |
9 | + previous = ForeignKey(Flashcard) | |
10 | + author = ForeignKey(User) | |
11 | + hidden = CharField(null=True, max_length=255) | |
12 | + mask = ForeignKey(FlashcardMask) | |
13 | + | |
14 | +class UserFlashCardReview(models.Model): | |
15 | + user_flashcard = models.ForeignKey(UserFlashCard) | |
16 | + when = models.DateTimeField() | |
17 | + blanked_word = models.CharField(max_length=8) | |
18 | + response = models.CharField(max_length=256, blank=True, null=True) | |
19 | + correct = models.NullBooleanField() | |
20 | + | |
21 | +class Class(models.Model): | |
22 | + department = models.CharField(max_length=50) | |
23 | + course_num = models.IntegerField() | |
24 | + name = models.CharField(max_length=50) | |
25 | + professor = models.CharField(max_length=50) | |
26 | + quarter = models.CharField(max_length=4) | |
27 | + members = models.ManyToManyField(USER) |