diff --git a/biscuit/apps/alsijil/models.py b/biscuit/apps/alsijil/models.py index 492fac1b7c971e6a9b71eeb5bc58f6481d8891b1..fba3ece6792d56d518a4241b97b145d3bb0adae9 100644 --- a/biscuit/apps/alsijil/models.py +++ b/biscuit/apps/alsijil/models.py @@ -1,2 +1,32 @@ from django.db import models from django.utils.translation import ugettext_lazy as _ + +from biscuit.chronos.util import current_week +from biscuit.core.mixins import SchoolRelated + + +class PersonalNote(SchoolRelated): + person = models.ForeignKey('core.Person', models.CASCADE) + + week = models.IntegerField() + lesson_period = models.ForeignKey('chronos.LessonPeriod', models.CASCADE) + + absent = models.BooleanField(default=False) + late = models.IntegerField(default=0) + excused = models.BooleanField(default=False) + + remarks = models.CharField(max_length=200, blank=True) + + class Meta: + unique_together = [['school', 'lesson_period', 'week', 'person']] + + +class LessonDocumentation(SchoolRelated): + week = models.IntegerField() + lesson_period = models.ForeigbKey('chronos.LessonPeriod', models.CASCADE) + + topic = models.CharField(verbose_name=_('Lesson topic'), max_length=200) + homework = models.CharField(verbose_name=_('Homework'), max_length=200) + + class Meta: + unique_together = [['school', 'lesson_period', 'week']] diff --git a/pyproject.toml b/pyproject.toml index cbaa9ca1ef03cc219610a5714d74b4a94f43b991..f1413a016e5c23b4ff88b8f447cf65201aeb8677 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ classifiers = [ [tool.poetry.dependencies] python = "^3.7" BiscuIT-ng = {version = "^1.0a0.dev0", allows-prereleases = true, path = "../../.."} -BiscuIT-App-Alsijil = {version = "^1.0a0.dev0", allows-prereleases = true, path = "../BiscuIT-App-Alsijil"} +BiscuIT-App-Chronos = {version = "^1.0a0.dev0", allows-prereleases = true, path = "../BiscuIT-App-Chronos"} [build-system] requires = ["poetry>=0.12"]