File size: 523 Bytes
71e71e8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | from peewee import *
from src.model.BaseModel import BaseModel
from src.model.Prediction import Prediction
class PredictionOption(BaseModel):
"""
Prediction option class
"""
prediction = ForeignKeyField(
Prediction, backref="prediction_options", on_delete="CASCADE", on_update="CASCADE"
)
number = IntegerField()
option = CharField(max_length=999)
is_correct = BooleanField(default=False)
class Meta:
db_table = "prediction_option"
PredictionOption.create_table()
|