<?php
/**
 * Created by PhpStorm.
 * User: sicilon_IT
 * Date: 2021/5/17
 * Time: 9:09
 */
namespace app\index\model;
use think\Model;
class noticereadmodel extends Model{
    protected $table='t_noticeread';

    /*
 * 20210517
 */
    public function insinfo($arr){
        $this->allowField(true)->isUpdate(false)->setAttr('id',null)->save($arr);
        return $this->id;
    }

    /*
     * 20210517
     */
    public function selnewinfobywid($wid){
        $where_arr['wid']=$wid;
        $rinfo=$this->where($where_arr)->order('id',"desc")->limit(0,1)->select();
        $rlist=collection($rinfo)->toArray();
        return $rlist;

    }
}