29 lines
577 B
PHP
29 lines
577 B
PHP
<?php
|
|
|
|
namespace App\Domains\Prop\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
#[Fillable([
|
|
'valuable_id',
|
|
'prop_id',
|
|
'value',
|
|
])]
|
|
class ModelPropValue extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'model_prop_values';
|
|
|
|
/**
|
|
* @return BelongsTo<Prop, $this>
|
|
*/
|
|
public function prop(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Prop::class, 'prop_id');
|
|
}
|
|
}
|