This commit is contained in:
2026-06-13 12:42:42 +03:30
parent f8c96a420f
commit e70fcef962
8 changed files with 264 additions and 7 deletions
+40
View File
@@ -0,0 +1,40 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class PriceSyncLogItem extends Model
{
protected $table = 'price_sync_log_items';
public $timestamps = false;
protected $fillable = [
'log_id',
'product_id',
'product_title',
'reading_method',
'source_name',
'base_price',
'base_profit',
'offset_percent',
'stored_price',
'previous_price',
];
protected $casts = [
'product_id' => 'integer',
'base_price' => 'integer',
'base_profit' => 'integer',
'offset_percent' => 'float',
'stored_price' => 'integer',
'previous_price' => 'integer',
];
public function log(): BelongsTo
{
return $this->belongsTo(PriceSyncLog::class, 'log_id');
}
}