<?php


namespace App\Models;


use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;

class RecordOperateLog extends Model
{
    const TABLE = 'QPRecordDB.dbo.YN_RecordOperateLog';
    protected $table = self::TABLE;

    public $timestamps = false;


    protected $guarded = [];

    public static function add_log($OperateType, $UserID, $Param)
    {
        $data = [
            'OperateType' => $OperateType,
            'UserID' => $UserID,
            'GroupID' => 0,
            'GameID' => 0,
            'Param' => $Param
        ];
        DB::connection('write')->table('QPRecordDB.dbo.YN_RecordOperateLog')->insert($data);
    }
}
