class Klas(db.Entity): id = PrimaryKey(int, auto=True) studying = Optional('Studying') number = Optional(int) date_set = Required(datetime) letter = Required(str) direction = Required('Direction') syllabus = Required('Syllabus') students = []
class Studying(db.Entity): id = PrimaryKey(int, auto=True) hour = Optional(int) klas = Optional('Klas') syllabus = Optional('Syllabus') subject = Optional('Subject') teacher = Optional('Teacher') subtheme = Optional('Subtheme') sub_theme = []
class Subtheme(db.Entity): id = PrimaryKey(int, auto=True) studying = Optional('Studying') topic = Optional('Topic')
class Result(db.Entity): id = PrimaryKey(int, auto=True) student = Optional('Student') mark = Required(int) datemark = Optional(datetime.datetime) topic = Optional('Topic')
class Student(Human): id = PrimaryKey(int, auto=True) result = Optional('Result') date = Required(datetime)
class Topic(db.Entity): id = PrimaryKey(int, auto=True) result = Optional('Result') subtheme = Optional('Subtheme') name_topic = Required(str)
class Syllabus(db.Entity): id = PrimaryKey(int, auto=True) studying = Optional('Studying') klas = Optional('Klas') start = Required(str) finish = Required(str)
class Teacher(Human): id = PrimaryKey(int, auto=True) subject = Optional('Subject') studying = Optional('Studying')
class Subject(db.Entity): id = PrimaryKey(int, auto=True) item_name = Required(str) studying = Optional('Studying') teacher = Optional('Teacher')