diff --git a/niucloud/app/model/chat_friends/ChatFriends.php b/niucloud/app/model/chat_friends/ChatFriends.php new file mode 100644 index 00000000..bb68bf3e --- /dev/null +++ b/niucloud/app/model/chat_friends/ChatFriends.php @@ -0,0 +1,91 @@ +where("personnel_id", $value); + } + } + + /** + * 搜索器:学生资源表id + * @param $value + * @param $data + */ + public function searchCustomerResourcesIdAttr($query, $value, $data) + { + if ($value) { + $query->where("customer_resources_id", $value); + } + } + + + public function campus(){ + return $this->hasOne(CustomerResources::class, 'id', 'customer_resources_id')->joinType('left')->withField('name,id')->bind(['customer_resources_id'=>'name']); + } + + public function personnel(){ + return $this->hasOne(Personnel::class, 'id', 'personnel_id')->joinType('left')->withField('name,id')->bind(['personnel_id_name'=>'name']); + } + +} diff --git a/niucloud/app/model/chat_messages/ChatMessages.php b/niucloud/app/model/chat_messages/ChatMessages.php new file mode 100644 index 00000000..aaf46334 --- /dev/null +++ b/niucloud/app/model/chat_messages/ChatMessages.php @@ -0,0 +1,50 @@ +