39 lines
901 B
PHP
39 lines
901 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* GainView.
|
|
*
|
|
* @property string $name Name
|
|
* @property string $file_name Name of the view file.
|
|
* @property-read \Illuminate\Support\Carbon $created_at Creation Date.
|
|
* @property-read \Illuminate\Support\Carbon $updated_at Last update Date.
|
|
*
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Prizes[] $prizes
|
|
* Associated prizes.
|
|
*/
|
|
class GainView extends Model
|
|
{
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'name',
|
|
'file_name'
|
|
];
|
|
|
|
/**
|
|
* Prize relation
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
*/
|
|
public function prizes()
|
|
{
|
|
return $this->hasMany(Prize::class, 'gain_view_id');
|
|
}
|
|
}
|