| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Lenovo
- * Date: 2018/10/30
- * Time: 15:09
- */
- namespace App\Models;
- class ChatUsers extends BaseModel
- {
- protected $table = 'chat_users';
- function getlist($where,$limit ){
- return $this->where($where)
- ->limit($limit)
- ->get()
- ->toArray();
- }
- function addRecord($data){
- $res=$this->insert($data);
- if(!$res){
- return -6030001222;
- }
- }
- function getIdData($id){
- return $this->where("id",$id)->first();
- }
- public function updateIdData(int $id,$data){
- return $this->where("id",$id)->update($data);
- }
- }
|