Exemple #1
0
class Studying(db.Entity):
    id = PrimaryKey(int, auto=True)
    beginning_time = Required(time)
    date = Required(date)
    klas = Optional('Klas')
    syllabus = Optional('Syllabus')
    subjects = Set(Subject)
Exemple #2
0
class Klas(db.Entity):
    id = PrimaryKey(int, auto=True)
    date = Required(datetime)
    number = Required(int)
    letter = Required(str)
    direction = Required(Direction)
    syllabus = Required(Syllabus)
    studying = Optional(Studying)
    students = Set(Student)
Exemple #3
0
class UserSetting(db.Entity):

    id = PrimaryKey(int, auto=False, size=64)  # Telegram User ID
    lang = Optional(str, default='en')  # The language setting for this user
    stats = Optional(bool, default=False)  # Opt-in to keep game statistics
    first_places = Optional(int, default=0)  # Nr. of games won in first place
    games_played = Optional(int, default=0)  # Nr. of games completed
    cards_played = Optional(int, default=0)  # Nr. of cards played total
    use_keyboards = Optional(bool, default=False)  # Use keyboards (unused)
Exemple #4
0
class Syllabus(db.Entity):
    id = PrimaryKey(int, auto=True)
    klas = Optional('Klas')
    start = Required(date)
    finish = Required(date)
    studyings = Set(Studying)
Exemple #5
0
class Direction(db.Entity):
    id = PrimaryKey(int, auto=True)
    klas = Optional('Klas', cascade_delete=True)
    name = Required(str)
Exemple #6
0
class Subject(db.Entity):
    id = PrimaryKey(int, auto=True)
    topic = Optional('Topic', reverse='subjects')
    name = Required(str)
    teacher = Required(Teacher)
    schedule = Optional('Studying', reverse='subjects')