<?php

namespace app\index\model;

use think\Model;

class MsgModel extends Model {

    // 确定链接表名
    protected $name = 'msg';

    public function getMsgsByWhere($where , $offset , $limit)
    {
        return $this->where($where)->limit($offset, $limit)->order('id desc')->select();
    }
    public function getAllCounts($where)
    {
        return $this->where($where)->count();
    }
}