"integer", "question_id" => "integer", "correct_count" => "integer", // ✅ Ensures integer type "incorrect_count" => "integer", "hint_count" => "integer", "solved_count" => "integer", "points" => "double", "negative_points" => "double", "question_time" => "integer", "attempted_at" => "string", "is_evaluated" => "integer", "evaluated_by" => "string", "evaluated_id" => "integer", "evaluation_remark" => "string", ]; public function __construct(array $attributes = []) { parent::__construct($attributes); $this->table = acadlix()->helper()->acadlix_table_prefix('statistic'); } public function statistic_ref() { return $this->belongsTo(acadlix()->model()->statisticRef(), 'statistic_ref_id', 'id'); } public function question() { return $this->belongsTo(acadlix()->model()->question(), 'question_id', 'id'); } public function setAnswerDataAttribute($value) { $this->attributes['answer_data'] = maybe_serialize($value); } public function getAnswerDataAttribute($value) { return maybe_unserialize($value); } } }