2017-07-24 02:07:41 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class PirepEvent
|
|
|
|
*
|
|
|
|
* @package App\Models
|
|
|
|
*/
|
2017-12-26 05:19:34 +08:00
|
|
|
class PirepEvent extends BaseModel
|
2017-07-24 02:07:41 +08:00
|
|
|
{
|
|
|
|
public $table = 'pirep_fields';
|
|
|
|
|
|
|
|
public $fillable
|
|
|
|
= [
|
|
|
|
'name',
|
|
|
|
'value',
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that should be casted to native types.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $casts
|
|
|
|
= [
|
|
|
|
'name' => 'string',
|
|
|
|
'required' => 'integer',
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Validation rules
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
public static $rules
|
|
|
|
= [
|
|
|
|
'name' => 'required',
|
|
|
|
];
|
|
|
|
|
|
|
|
public function pirep()
|
|
|
|
{
|
|
|
|
return $this->belongsTo('App\Models\Pirep', 'pirep_id');
|
|
|
|
}
|
|
|
|
}
|