2017-08-02 23:17:54 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class PirepEvent
|
|
|
|
*
|
|
|
|
* @package App\Models
|
|
|
|
*/
|
2017-12-26 05:19:34 +08:00
|
|
|
class PirepComment extends BaseModel
|
2017-08-02 23:17:54 +08:00
|
|
|
{
|
|
|
|
public $table = 'pirep_comments';
|
|
|
|
|
2018-01-04 05:27:56 +08:00
|
|
|
public $fillable = [
|
|
|
|
'pirep_id',
|
|
|
|
'user_id',
|
|
|
|
'comment',
|
|
|
|
];
|
2017-08-02 23:17:54 +08:00
|
|
|
|
2018-01-04 05:27:56 +08:00
|
|
|
public static $rules = [
|
|
|
|
'comment' => 'required',
|
|
|
|
];
|
2017-08-02 23:17:54 +08:00
|
|
|
|
|
|
|
public function pirep()
|
|
|
|
{
|
|
|
|
return $this->belongsTo('App\Models\Pirep', 'pirep_id');
|
|
|
|
}
|
2018-01-04 05:27:56 +08:00
|
|
|
|
|
|
|
public function user()
|
|
|
|
{
|
|
|
|
return $this->belongsTo('App\Models\User', 'user_id');
|
|
|
|
}
|
2017-08-02 23:17:54 +08:00
|
|
|
}
|