*/ use HasFactory; public $timestamps = false; protected $primaryKey = 'node_id'; public $incrementing = false; protected $keyType = 'string'; protected function casts(): array { return [ 'is_same_trading_and_brand' => 'boolean', 'is_supermarket' => 'boolean', 'is_motorway_service_station' => 'boolean', 'is_supermarket_service_station' => 'boolean', 'temporary_closure' => 'boolean', 'permanent_closure' => 'boolean', 'permanent_closure_date' => 'date', 'amenities' => 'array', 'opening_times' => 'array', 'fuel_types' => 'array', 'last_seen_at' => 'datetime', ]; } public function currentPrices(): HasMany { return $this->hasMany(StationPriceCurrent::class, 'station_id', 'node_id'); } public function prices(): HasMany { return $this->hasMany(StationPrice::class, 'station_id', 'node_id'); } }