33 lines
658 B
PHP
33 lines
658 B
PHP
<?php
|
|||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||
|
|
|
||
|
|
class PriceSyncLog extends Model
|
||
|
|
{
|
||
|
|
protected $table = 'price_sync_logs';
|
||
|
|
|
||
|
|
public $timestamps = false;
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'source',
|
||
|
|
'source_url',
|
||
|
|
'liquid_gold_price',
|
||
|
|
'products_updated',
|
||
|
|
'created_at',
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'liquid_gold_price' => 'integer',
|
||
|
|
'products_updated' => 'integer',
|
||
|
|
'created_at' => 'datetime',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function items(): HasMany
|
||
|
|
{
|
||
|
|
return $this->hasMany(PriceSyncLogItem::class, 'log_id');
|
||
|
|
}
|
||
|
|
}
|