<?php

namespace App\Models;

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

class UserLogs extends Model
{
    public static function insert($userId, $log)
    {
		$now = time();
        return DB::insert("INSERT into t_user_log
			set
				userId = ?,
				log = ?,
				crt = ?
		", [$userId, json_encode($log), $now]);
	}
}
