26 lines
466 B
PHP
26 lines
466 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ActivityProductPart extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'activity_id', 'part_id',
|
|
];
|
|
|
|
public function part()
|
|
{
|
|
return $this->belongsTo(Part::class, 'part_id');
|
|
}
|
|
|
|
public function activity()
|
|
{
|
|
return $this->belongsTo(Activity::class, 'activity_id');
|
|
}
|
|
}
|