hanabiapp.models.pre_survey
1from .. import db 2from .user import User 3 4class PreSurvey(db.Model): 5 """ 6 ゲーム開始前のアンケートデータをデータベースに保存するためのモデル. 7 8 Attributes: 9 id (int): アンケートの一意の識別子 10 user_id (int): 回答者のユーザーID(`user.id` への外部キー) 11 question_id (str): 質問の識別子 12 answer_id (str): 回答の識別子 13 """ 14 __tablename__ = 'PreSurvey' 15 id = db.Column(db.Integer, primary_key=True, autoincrement=True) 16 user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False) 17 18 question_id = db.Column(db.Text, nullable=False) 19 answer_id = db.Column(db.Text, nullable=False)
class
PreSurvey(sqlalchemy.orm.decl_api._DynamicAttributesType, sqlalchemy.inspection.Inspectable[sqlalchemy.orm.mapper.Mapper[typing.Any]]):
5class PreSurvey(db.Model): 6 """ 7 ゲーム開始前のアンケートデータをデータベースに保存するためのモデル. 8 9 Attributes: 10 id (int): アンケートの一意の識別子 11 user_id (int): 回答者のユーザーID(`user.id` への外部キー) 12 question_id (str): 質問の識別子 13 answer_id (str): 回答の識別子 14 """ 15 __tablename__ = 'PreSurvey' 16 id = db.Column(db.Integer, primary_key=True, autoincrement=True) 17 user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False) 18 19 question_id = db.Column(db.Text, nullable=False) 20 answer_id = db.Column(db.Text, nullable=False)
ゲーム開始前のアンケートデータをデータベースに保存するためのモデル.
Attributes:
- id (int): アンケートの一意の識別子
- user_id (int): 回答者のユーザーID(
user.id
への外部キー) - question_id (str): 質問の識別子
- answer_id (str): 回答の識別子
PreSurvey(**kwargs)
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and
values in kwargs
.
Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.