feat: add app and database modules

This commit is contained in:
2026-05-21 16:05:11 +07:00
parent 37b7e783f5
commit fad70d096b
212 changed files with 23901 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Prunable;
class MobileSyncLog extends Model
{
use Prunable;
public $timestamps = false;
/**
* Get the prunable model query.
*/
public function prunable(): Builder
{
return self::query()->where('synced_at', '<=', now()->subDays(30));
}
protected $fillable = [
'user_id',
'platform',
'device_model',
'app_version',
'ip_address',
'synced_at',
];
protected $casts = [
'synced_at' => 'datetime',
];
public function user()
{
return $this->belongsTo(User::class);
}
}