init
This commit is contained in:
30
app/Models/VehicleDataSource.php
Normal file
30
app/Models/VehicleDataSource.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class VehicleDataSource extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'vehicle_record_id',
|
||||
'source_name',
|
||||
'source_url',
|
||||
'last_fetched_at',
|
||||
'cache_expires_at',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'last_fetched_at' => 'datetime',
|
||||
'cache_expires_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function vehicleRecord(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(VehicleRecord::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user