29 lines
508 B
PHP
29 lines
508 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
class Weight extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'category_id',
|
|
'subcategory_id',
|
|
'weight_value',
|
|
'normalized_weight'
|
|
];
|
|
|
|
public function category()
|
|
{
|
|
return $this->belongsTo(Category::class);
|
|
}
|
|
|
|
public function subcategory()
|
|
{
|
|
return $this->belongsTo(Subcategory::class);
|
|
}
|
|
}
|