<?php
namespace App\Models;

use App\Models\BaseModel;

class OptionLogModel extends BaseModel
{
    protected $connection = 'mysql';
    protected $table = 'apk_option_log';

    /**
     * 记录用操作日志
     * @return array
     * @date 2020/11/25
     * @author live
     */
    public static function getAddLog($modeule,$type,$param,$optionId,$dataId,$remark)
    {
        $row = new OptionLogModel();
        $row->modeule = $modeule;
        $row->type = $type;
        $row->sumbit_param = json_encode($param);
        $row->option_id = $optionId;
        $row->data_id = $dataId;
        $row->remak = $remark;
        if($row->save()) return $row->id;
        return false;
    }

}

