35 lines
711 B
PHP
35 lines
711 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class UserOpsSoftwarePreference extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'ops_protocol_id',
|
|
'ops_software_id',
|
|
];
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
public function protocol(): BelongsTo
|
|
{
|
|
return $this->belongsTo(OpsProtocol::class, 'ops_protocol_id');
|
|
}
|
|
|
|
public function software(): BelongsTo
|
|
{
|
|
return $this->belongsTo(OpsSoftware::class, 'ops_software_id');
|
|
}
|
|
}
|
|
|