ponepaste/includes/Models/AdminLog.php

30 lines
683 B
PHP
Raw Normal View History

2021-11-02 08:46:40 -04:00
<?php
namespace PonePaste\Models;
use Illuminate\Database\Eloquent\Model;
class AdminLog extends Model {
public const ACTION_LOGIN = 0;
public const ACTION_FAIL_LOGIN = 1;
public const ACTION_EDIT_CONFIG = 2;
public const ACTION_HIDE_PASTE = 3;
public const ACTION_BLANK_PASTE = 4;
2023-05-12 02:06:31 -04:00
public const ACTION_NAMES = [
'Login',
'Failed Login',
'Edit Config',
'Hide Paste',
'Blank Paste'
2023-05-12 02:06:31 -04:00
];
2021-11-02 08:46:40 -04:00
protected $table = 'admin_logs';
protected $fillable = ['user_id', 'action', 'ip', 'time', 'message'];
public $timestamps = false;
public function user() {
return $this->belongsto(User::class);
}
2021-11-02 08:46:40 -04:00
}