Files
lotteryLaravel/app/Models/AuditLog.php

39 lines
811 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Models;
use App\Services\AuditLogger;
use Illuminate\Database\Eloquent\Model;
/** 运维/后台动作留痕表 audit_logs写入请走 {@see AuditLogger})。 */
class AuditLog extends Model
{
public const UPDATED_AT = null;
protected $table = 'audit_logs';
/** @var list<string> */
protected $fillable = [
'operator_type',
'operator_id',
'module_code',
'action_code',
'target_type',
'target_id',
'before_json',
'after_json',
'ip',
'user_agent',
];
protected function casts(): array
{
return [
'operator_id' => 'integer',
'before_json' => 'json',
'after_json' => 'json',
'created_at' => 'datetime',
];
}
}