用户每日活跃检测
This commit is contained in:
50
app/Models/Customer/CustomerChangeInfoLogModel.php
Normal file
50
app/Models/Customer/CustomerChangeInfoLogModel.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Customer;
|
||||
|
||||
use App\Cache\Table\TableCustomerUserCache;
|
||||
use App\Models\Base\CustomerBaseModel;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class CustomerChangeInfoLogModel extends CustomerBaseModel
|
||||
{
|
||||
protected $table = 'customer_change_info_log';
|
||||
protected $primaryKey = 'id';
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'type',
|
||||
'uid',
|
||||
'column',
|
||||
'value',
|
||||
'before_value',
|
||||
'after_value',
|
||||
'pid',
|
||||
'remark_key',
|
||||
'remark_desc',
|
||||
'created_at',
|
||||
];
|
||||
|
||||
const PID_SYSTEM = 0; //系统默认pid
|
||||
|
||||
const TYPE_CHANG_USER_ACTIVE_STATUS = 1;
|
||||
const TYPE = [
|
||||
self::TYPE_CHANG_USER_ACTIVE_STATUS => '修改用户活跃状态',
|
||||
];
|
||||
|
||||
const REMARK_DAILY_CHECK_USER_ACTIVE_STATUS_YES = 'dailyCheckUserActiveStatusYes';
|
||||
const REMARK_DAILY_CHECK_USER_ACTIVE_STATUS_NO = 'dailyCheckUserActiveStatusNo';
|
||||
const REMARK = [
|
||||
self::REMARK_DAILY_CHECK_USER_ACTIVE_STATUS_YES => '每日检查用户活跃状态-活跃',
|
||||
self::REMARK_DAILY_CHECK_USER_ACTIVE_STATUS_NO => '每日检查用户活跃状态-不活跃',
|
||||
];
|
||||
|
||||
function addLog($aItem): \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Builder|array|null
|
||||
{
|
||||
$sDateTime = Carbon::now()->toDateTimeString();
|
||||
$aItem['created_at'] = $sDateTime;
|
||||
return $this->addItem($aItem);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user