class ShortStoryContent(db.Model): id = db.Column(db.Integer(), primary_key=True, autoincrement=True) short_story_id = db.Column(db.Integer(), db.ForeignKey('short_story.id')) language = db.Column(db.String(10)) content = db.Column(db.Text()) created_at = db.Column(db.DateTime(timezone=True), server_default=func.now()) updated_at = db.Column(db.DateTime(timezone=True), onupdate=func.now()) deleted_at = db.Column(db.DateTime())
class User(db.Model): id = db.Column(db.Integer(), primary_key=True, autoincrement=True) email = db.Column(db.Text(), unique=True) email_lower = db.Column(db.Text(), unique=True) username = db.Column(db.String(30), unique=True) password_hash = db.Column(db.String(128)) native_language = db.Column(db.String(10)) language_i_want_to_learn = db.Column(db.String(10)) has_studied_foreign_language = db.Column(db.Boolean()) avatar_url = db.Column(db.String(128)) email_verified = db.Column(db.Boolean()) verify_email_link_sent = db.Column(db.Boolean()) created_at = db.Column(db.DateTime(timezone=True), server_default=func.now()) updated_at = db.Column(db.DateTime(timezone=True), onupdate=func.now()) deleted_at = db.Column(db.DateTime()) score = relationship('UserScore', uselist=False) language_history = relationship('LanguageHistory')
class MultipleChoiceQuestionTranslation(db.Model): id = db.Column(db.Integer(), primary_key=True, autoincrement=True) short_story_id = db.Column(db.Integer(), db.ForeignKey('short_story.id')) multiple_choice_question_id = db.Column(db.Integer(), db.ForeignKey('multiple_choice_question.id')) language = db.Column(db.String(10)) question = db.Column(db.Text()) sequence = db.Column(db.Integer()) created_at = db.Column(db.DateTime(timezone=True), server_default=func.now()) updated_at = db.Column(db.DateTime(timezone=True), onupdate=func.now()) deleted_at = db.Column(db.DateTime()) multiple_choice_answer_translations = relationship('MultipleChoiceAnswerTranslation')
class MultipleChoiceAnswer(db.Model): id = db.Column(db.Integer(), primary_key=True, autoincrement=True) multiple_choice_question_id = db.Column( db.Integer(), db.ForeignKey('multiple_choice_question.id')) language = db.Column(db.String(10)) answer = db.Column(db.Text()) order = db.Column(db.Integer()) is_correct = db.Column(db.Boolean()) created_at = db.Column(db.DateTime(timezone=True), server_default=func.now()) updated_at = db.Column(db.DateTime(timezone=True), onupdate=func.now()) deleted_at = db.Column(db.DateTime()) multiple_choice_answer_translations = relationship( 'MultipleChoiceAnswerTranslation')