['msg_type'], ]; } public function queryWhere() { $where = []; $where[] = ['user_id', '=', $this->userId]; return $where; } public function lists():array { return MasterWorkerMessage::where($this->searchWhere) ->where($this->queryWhere()) ->field(['id', 'title','describe','create_time','update_time']) ->order(['id' => 'asc']) ->select() ->toArray(); } public function count(): int { return MasterWorkerMessage::where($this->searchWhere)->where($this->queryWhere())->count(); } }