Files
technical-services-exchange/app/Models/ExternalWorkHistoryEntry.php
T
Codex 62220186af Add external import sources, work history, screening fields and Phase 1 docs
- New ExternalImportSource and ExternalWorkHistoryEntry models, controller and migrations
- Screening fields on external profile imports
- Admin and provider profile views, routes and workflow tests updated
- Phase 1 validation, route inventory, gap report template and roadmap docs
- Add the Google Sheets work-order parser tool (tools/google-sheets-wo-parser)
2026-10-02 15:50:18 -05:00

41 lines
1.1 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
#[Fillable([
'provider_profile_id', 'external_profile_import_id', 'external_import_source_id',
'platform', 'external_work_order_id', 'service_title', 'performed_on',
'customer_name', 'work_type', 'location', 'rating', 'status', 'source_url',
'visibility', 'raw_payload',
])]
class ExternalWorkHistoryEntry extends Model
{
protected function casts(): array
{
return [
'performed_on' => 'date',
'rating' => 'decimal:2',
'raw_payload' => 'array',
];
}
public function providerProfile(): BelongsTo
{
return $this->belongsTo(ProviderProfile::class);
}
public function externalProfileImport(): BelongsTo
{
return $this->belongsTo(ExternalProfileImport::class);
}
public function externalImportSource(): BelongsTo
{
return $this->belongsTo(ExternalImportSource::class);
}
}