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'],
|
||||
];
|
||||
}
|
||||
@@ -31,6 +31,10 @@ class ExamMemberRankQuestion extends Model
|
||||
'text' => 'required',
|
||||
];
|
||||
|
||||
public $hasMany = [
|
||||
'exam_answers' => 'GermanAirlinesVa\Schooling\Models\ExamMemberRankAnswer',
|
||||
];
|
||||
|
||||
public $belongsTo = [
|
||||
'member_rank' => 'GermanAirlinesVa\Schooling\Models\MemberRank',
|
||||
];
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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'],
|
||||
];
|
||||
}
|
||||
@@ -32,4 +32,8 @@ class MemberRank extends Model
|
||||
'badge' => 'required',
|
||||
'region' => 'required',
|
||||
];
|
||||
|
||||
public $hasMany = [
|
||||
'exam_questions' => 'GermanAirlinesVa\Schooling\Models\ExamMemberRankQuestion',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -28,5 +28,6 @@ class Typerating extends Model
|
||||
|
||||
public $hasMany = [
|
||||
'aircraft_types' => 'GermanAirlinesVa\Fleet\Models\AircraftType',
|
||||
'exam_questions' => 'GermanAirlinesVa\Schooling\Models\ExamTyperatingQuestion',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
columns:
|
||||
id:
|
||||
label: id
|
||||
type: text
|
||||
exam_question_id:
|
||||
label: exam_question_id
|
||||
type: text
|
||||
searchable: true
|
||||
relation: exam_question
|
||||
valueFrom: text
|
||||
text:
|
||||
label: text
|
||||
type: text
|
||||
searchable: true
|
||||
is_correct:
|
||||
label: is_correct
|
||||
type: switch
|
||||
@@ -0,0 +1,19 @@
|
||||
fields:
|
||||
exam_question:
|
||||
label: 'germanairlinesva.schooling::lang.exam_answer.question'
|
||||
nameFrom: text
|
||||
descriptionFrom: description
|
||||
span: auto
|
||||
required: 1
|
||||
type: relation
|
||||
text:
|
||||
label: 'germanairlinesva.schooling::lang.exam_answer.text'
|
||||
size: small
|
||||
span: auto
|
||||
required: 1
|
||||
type: richeditor
|
||||
is_correct:
|
||||
label: 'germanairlinesva.schooling::lang.exam_answer.is_correct'
|
||||
span: auto
|
||||
required: 1
|
||||
type: switch
|
||||
@@ -0,0 +1,17 @@
|
||||
columns:
|
||||
id:
|
||||
label: id
|
||||
type: text
|
||||
exam_question_id:
|
||||
label: exam_question_id
|
||||
type: text
|
||||
searchable: true
|
||||
relation: exam_question
|
||||
valueFrom: text
|
||||
text:
|
||||
label: text
|
||||
type: text
|
||||
searchable: true
|
||||
is_correct:
|
||||
label: is_correct
|
||||
type: switch
|
||||
@@ -0,0 +1,19 @@
|
||||
fields:
|
||||
exam_question:
|
||||
label: 'germanairlinesva.schooling::lang.exam_answer.question'
|
||||
nameFrom: text
|
||||
descriptionFrom: description
|
||||
span: auto
|
||||
required: 1
|
||||
type: relation
|
||||
text:
|
||||
label: 'germanairlinesva.schooling::lang.exam_answer.text'
|
||||
size: small
|
||||
span: auto
|
||||
required: 1
|
||||
type: richeditor
|
||||
is_correct:
|
||||
label: 'germanairlinesva.schooling::lang.exam_answer.is_correct'
|
||||
span: auto
|
||||
required: 1
|
||||
type: switch
|
||||
@@ -4,8 +4,9 @@ columns:
|
||||
type: text
|
||||
member_rank:
|
||||
label: member_rank
|
||||
relation: member_rank
|
||||
type: text
|
||||
searchable: true
|
||||
relation: member_rank
|
||||
valueFrom: name
|
||||
in_use:
|
||||
label: in_use
|
||||
@@ -13,9 +14,11 @@ columns:
|
||||
mandatory:
|
||||
label: mandatory
|
||||
type: text
|
||||
searchable: false
|
||||
text:
|
||||
label: text
|
||||
type: text
|
||||
searchable: true
|
||||
picture:
|
||||
label: picture
|
||||
type: text
|
||||
|
||||
@@ -19,7 +19,7 @@ fields:
|
||||
type: switch
|
||||
text:
|
||||
label: 'germanairlinesva.schooling::lang.exam_question.text'
|
||||
size: large
|
||||
size: small
|
||||
span: auto
|
||||
required: 1
|
||||
type: richeditor
|
||||
|
||||
@@ -5,17 +5,20 @@ columns:
|
||||
typerating:
|
||||
label: typerating
|
||||
type: text
|
||||
searchable: true
|
||||
relation: typerating
|
||||
valueFrom: name
|
||||
in_use:
|
||||
label: in_use
|
||||
type: text
|
||||
searchable: false
|
||||
mandatory:
|
||||
label: mandatory
|
||||
type: text
|
||||
text:
|
||||
label: text
|
||||
type: text
|
||||
searchable: true
|
||||
picture:
|
||||
label: picture
|
||||
type: text
|
||||
|
||||
@@ -20,7 +20,7 @@ fields:
|
||||
type: switch
|
||||
text:
|
||||
label: 'germanairlinesva.schooling::lang.exam_question.text'
|
||||
size: large
|
||||
size: small
|
||||
span: auto
|
||||
required: 1
|
||||
type: richeditor
|
||||
|
||||
Reference in New Issue
Block a user