37 lines
789 B
PHP
37 lines
789 B
PHP
<?php namespace GermanAirlinesVa\Schooling\Models;
|
|
|
|
use Model;
|
|
|
|
/**
|
|
* Model
|
|
*/
|
|
class ExamTyperatingAnswer 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\ExamTyperatingQuestion', 'key' => 'exam_question_id'],
|
|
];
|
|
}
|