apilogs
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (8.3) (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled
tests / ci (8.5) (push) Has been cancelled

This commit is contained in:
Ovidiu U
2026-04-04 08:41:21 +01:00
parent 9e0aebc729
commit 097f1b0529
11 changed files with 618 additions and 73 deletions

19
app/Models/ApiLog.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
#[Fillable(['service', 'method', 'url', 'status_code', 'duration_ms', 'error'])]
class ApiLog extends Model
{
const null UPDATED_AT = null;
protected function casts(): array
{
return [
'created_at' => 'datetime',
];
}
}

View File

@@ -15,17 +15,21 @@ class StationPriceCurrent extends Model
/** @use HasFactory<StationPriceCurrentFactory> */
use HasFactory;
protected $table = 'station_prices_current';
public $timestamps = false;
protected $primaryKey = null;
public $incrementing = false;
protected function casts(): array
{
return [
'fuel_type' => FuelType::class,
'fuel_type' => FuelType::class,
'price_effective_at' => 'datetime',
'price_reported_at' => 'datetime',
'recorded_at' => 'datetime',
'price_reported_at' => 'datetime',
'recorded_at' => 'datetime',
];
}