Answers
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php namespace GermanAirlinesVa\Schooling\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
/**
|
||||
* Model
|
||||
*/
|
||||
class ExamMemberRankAnswer extends Model
|
||||
{
|
||||
use \October\Rain\Database\Traits\Validation;
|
||||
|
||||
/*
|
||||
* Disable timestamps by default.
|
||||
* Remove this line if timestamps are defined in the database table.
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* @var string The database table used by the model.
|
||||
*/
|
||||
public $table = 'exam_answers';
|
||||
protected $connection = 'germanairlinesva_schooling';
|
||||
|
||||
/**
|
||||
* @var array Validation rules
|
||||
*/
|
||||
public $rules = [
|
||||
'exam_question' => 'required',
|
||||
'text' => 'required',
|
||||
'is_correct' => 'required',
|
||||
];
|
||||
|
||||
public $belongsTo = [
|
||||
'exam_question' => ['GermanAirlinesVa\Schooling\Models\ExamMemberRankQuestion', 'key' => 'exam_question_id'],
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user