2026.06.8
This commit is contained in:
24
app/Models/ReplicationLog.php
Normal file
24
app/Models/ReplicationLog.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ReplicationLog extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'status',
|
||||
'schedule_id',
|
||||
'tables_success',
|
||||
'tables_failed',
|
||||
'errors',
|
||||
'payload',
|
||||
'received_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'errors' => 'array',
|
||||
'payload' => 'array',
|
||||
'received_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
23
app/Models/ReplicationSchedule.php
Normal file
23
app/Models/ReplicationSchedule.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ReplicationSchedule extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'schedule_id',
|
||||
'name',
|
||||
'is_active',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'is_active' => 'boolean',
|
||||
];
|
||||
|
||||
public function scopeActive($query)
|
||||
{
|
||||
return $query->where('is_active', true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user