- Added `Choices` component for dropdowns with search and multi-selection functionality. - Implemented foundational classes for service connection: - `ConnectServiceData` - `ConnectedServiceFactory` - `ConnectedServicesService` - Added `ConnectServiceForm` Livewire component for managing service connections. - Introduced shared utility traits (`HasAttributeHelpers`) and error components. - Added components for generic use: `Input` and `ListItem`.
35 lines
761 B
PHP
35 lines
761 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasOne;
|
|
|
|
#[Fillable([
|
|
'name',
|
|
'slug',
|
|
'service_protocol_id',
|
|
'service_provider_id',
|
|
'service_status_id',
|
|
])]
|
|
class ConnectedService extends Model
|
|
{
|
|
public function protocol(): HasOne
|
|
{
|
|
return $this->hasOne(ServiceProtocol::class, 'id', 'service_protocol_id');
|
|
}
|
|
|
|
public function provider(): HasOne
|
|
{
|
|
return $this->hasOne(ServiceProvider::class, 'id', 'service_provider_id');
|
|
}
|
|
|
|
public function status(): HasOne
|
|
{
|
|
return $this->hasOne(ServiceStatus::class, 'id', 'service_status_id');
|
|
}
|
|
}
|