LiuJ hai 2 semanas
pai
achega
ef465f833b

+ 267 - 56
app/JsonRpc/WebsiteService.php

@@ -25,12 +25,15 @@ use App\Model\Website;
 use App\Model\WebsiteColumn;
 use App\Model\WebsiteColumn;
 use App\Model\Good;
 use App\Model\Good;
 use App\Model\Book;
 use App\Model\Book;
+use App\Model\ChatRecords;
+use App\Model\ChatTopic;
 use App\Model\JobRecruiting;
 use App\Model\JobRecruiting;
 use App\Model\JobHunting;
 use App\Model\JobHunting;
 use App\Model\Notice;
 use App\Model\Notice;
 use App\Model\Complaint;
 use App\Model\Complaint;
 use App\Model\Order;
 use App\Model\Order;
 use App\Model\WebsiteImg;
 use App\Model\WebsiteImg;
+use App\Model\ChatTopicsReply;
 use Hyperf\HttpServer\Contract\RequestInterface;
 use Hyperf\HttpServer\Contract\RequestInterface;
 
 
 use Hyperf\DbConnection\Db;
 use Hyperf\DbConnection\Db;
@@ -42,6 +45,7 @@ use App\Model\WebsiteGroup;
 use App\Model\WebsiteTemplate;
 use App\Model\WebsiteTemplate;
 use App\Model\Sector;
 use App\Model\Sector;
 use PhpParser\Node\Stmt\Return_;
 use PhpParser\Node\Stmt\Return_;
+use SimpleKafkaClient\Metadata\Topic;
 use function PHPUnit\Framework\isNull;
 use function PHPUnit\Framework\isNull;
 use Overtrue\Pinyin\Pinyin;
 use Overtrue\Pinyin\Pinyin;
 use App\Tools\buildTree;
 use App\Tools\buildTree;
@@ -49,6 +53,7 @@ use App\Model\WhiteRouter;
 use App\Model\Size;
 use App\Model\Size;
 use App\Tools\PinyinHelper;
 use App\Tools\PinyinHelper;
 use Hyperf\HttpServer\Annotation\AutoController;
 use Hyperf\HttpServer\Annotation\AutoController;
+
 #[RpcService(name: "WebsiteService", protocol: "jsonrpc-http", server: "jsonrpc-http")]
 #[RpcService(name: "WebsiteService", protocol: "jsonrpc-http", server: "jsonrpc-http")]
 class WebsiteService implements WebsiteServiceInterface
 class WebsiteService implements WebsiteServiceInterface
 {
 {
@@ -93,7 +98,7 @@ class WebsiteService implements WebsiteServiceInterface
         ];
         ];
         return Result::success($data);
         return Result::success($data);
     }
     }
-    
+
     /**
     /**
      * @param array $data
      * @param array $data
      */
      */
@@ -120,15 +125,14 @@ class WebsiteService implements WebsiteServiceInterface
             //'city_arr_id'=>$data['city_arr_id']??[0],
             //'city_arr_id'=>$data['city_arr_id']??[0],
             'template_id' => $data['template_id'] ?? 0,
             'template_id' => $data['template_id'] ?? 0,
             'suffix' => $data['suffix'] ?? "",
             'suffix' => $data['suffix'] ?? "",
-           'ad_key' => $data['ad_key']?? "",
-        ];        
+            'ad_key' => $data['ad_key'] ?? "",
+        ];
         $result = Website::insertGetId($insertData);
         $result = Website::insertGetId($insertData);
         if (empty($result)) {
         if (empty($result)) {
             return Result::error("创建网站失败", 0);
             return Result::error("创建网站失败", 0);
         } else {
         } else {
             return Result::success(["id" => $result]);
             return Result::success(["id" => $result]);
         }
         }
-       
     }
     }
 
 
     /**
     /**
@@ -151,7 +155,7 @@ class WebsiteService implements WebsiteServiceInterface
             //           'city_arr_id'=>$data['city_arr_id']??[0],
             //           'city_arr_id'=>$data['city_arr_id']??[0],
             'template_id' => $data['template_id'] ?? 0,
             'template_id' => $data['template_id'] ?? 0,
             'suffix' => $data['suffix'] ?? "",
             'suffix' => $data['suffix'] ?? "",
-            'ad_key' => $data['ad_key']?? "",
+            'ad_key' => $data['ad_key'] ?? "",
         ];
         ];
         $web_templsate = WebsiteTemplateInfo::where('website_id', $data['id'])->first();
         $web_templsate = WebsiteTemplateInfo::where('website_id', $data['id'])->first();
         // `status` tinyint(1) DEFAULT '0' COMMENT '0:未构建 1:未应用 2:已应用',
         // `status` tinyint(1) DEFAULT '0' COMMENT '0:未构建 1:未应用 2:已应用',
@@ -159,7 +163,7 @@ class WebsiteService implements WebsiteServiceInterface
             return Result::error("此网站已应用,不可修改基本信息", 0);
             return Result::error("此网站已应用,不可修改基本信息", 0);
         }
         }
         $web = Website::where(function ($query) use ($data) {
         $web = Website::where(function ($query) use ($data) {
-            $query->where('id','!=', $data['id'])
+            $query->where('id', '!=', $data['id'])
                 ->where('ad_key', $data['ad_key']);
                 ->where('ad_key', $data['ad_key']);
         })->first();
         })->first();
         if (!empty($web)) {
         if (!empty($web)) {
@@ -633,43 +637,43 @@ class WebsiteService implements WebsiteServiceInterface
      * @return array
      * @return array
      */
      */
 
 
-     public function getWebsiteModelCategory(array $data): array
-     {
-         // return Result::success($data);
-         $website_id = [
-             'website_id' => $data['website_id'],
-         ];
-         // 初始化 $pid 数组
-         // $pid = [];
-         // 以下注释掉的代码是之前的逻辑,用于获取非顶级分类的 pid
-         $pidQuery = WebsiteCategory::where($website_id)
-             ->where('pid', '!=', 0)
-             ->orderBy('sort')
-             ->select('pid', 'category_id', 'alias','aLIas_pinyin');
-         $pid = $pidQuery->pluck('pid');
-         $pid = array_values(array_unique($pid->toArray()));
-         // 构建查询语句
-         $query = WebsiteCategory::where($website_id)
-             ->where('pid', $data['pid'])
-             ->offset($data['placeid'])
-             ->limit($data['num'])
-             ->orderBy('sort');
-         // 如果 $pid 数组不为空,添加 CASE WHEN 条件
-         if (!empty($pid)) {
-             $placeholders = implode(',', array_fill(0, count($pid), '?'));
-             $query->selectRaw("website_category.*, CASE WHEN website_category.category_id IN ($placeholders) THEN 1 ELSE 0 END AS children_count", $pid);
-         } else {
-             // 如果 $pid 数组为空,不添加 CASE WHEN 条件,添加字段 children_count 并赋值为 0
-             $query->select('website_category.*', DB::raw('0 as children_count'));
-         }
- 
-         // 执行查询
-         $placeid = $data['placeid'] - 1;
-         $result = $query->offset($placeid)->limit($data['num'])->get();
- 
-         if (!empty($result)) {
-             $pidResults = $pidQuery->get();
-             if(isset($data['type']) && $data['type'] == 1){
+    public function getWebsiteModelCategory(array $data): array
+    {
+        // return Result::success($data);
+        $website_id = [
+            'website_id' => $data['website_id'],
+        ];
+        // 初始化 $pid 数组
+        // $pid = [];
+        // 以下注释掉的代码是之前的逻辑,用于获取非顶级分类的 pid
+        $pidQuery = WebsiteCategory::where($website_id)
+            ->where('pid', '!=', 0)
+            ->orderBy('sort')
+            ->select('pid', 'category_id', 'alias', 'aLIas_pinyin');
+        $pid = $pidQuery->pluck('pid');
+        $pid = array_values(array_unique($pid->toArray()));
+        // 构建查询语句
+        $query = WebsiteCategory::where($website_id)
+            ->where('pid', $data['pid'])
+            ->offset($data['placeid'])
+            ->limit($data['num'])
+            ->orderBy('sort');
+        // 如果 $pid 数组不为空,添加 CASE WHEN 条件
+        if (!empty($pid)) {
+            $placeholders = implode(',', array_fill(0, count($pid), '?'));
+            $query->selectRaw("website_category.*, CASE WHEN website_category.category_id IN ($placeholders) THEN 1 ELSE 0 END AS children_count", $pid);
+        } else {
+            // 如果 $pid 数组为空,不添加 CASE WHEN 条件,添加字段 children_count 并赋值为 0
+            $query->select('website_category.*', DB::raw('0 as children_count'));
+        }
+
+        // 执行查询
+        $placeid = $data['placeid'] - 1;
+        $result = $query->offset($placeid)->limit($data['num'])->get();
+
+        if (!empty($result)) {
+            $pidResults = $pidQuery->get();
+            if (isset($data['type']) && $data['type'] == 1) {
                 $result = $result->map(function ($item) use ($pidResults) {
                 $result = $result->map(function ($item) use ($pidResults) {
                     $children = $pidResults->where('pid', $item->category_id)->map(function ($child) {
                     $children = $pidResults->where('pid', $item->category_id)->map(function ($child) {
                         if (!empty($child)) {
                         if (!empty($child)) {
@@ -823,15 +827,207 @@ class WebsiteService implements WebsiteServiceInterface
                 $res = [];
                 $res = [];
                 //查询已审核文章
                 //查询已审核文章
                 $user_id = $data['user_id'];
                 $user_id = $data['user_id'];
+
+                $now = Carbon::now();
+                // 系统提醒审核消息
+                $sys_msg = [];
                 $article = Article::where('status', 1)
                 $article = Article::where('status', 1)
                     ->where('admin_user_id', $user_id)
                     ->where('admin_user_id', $user_id)
                     ->orderBy('updated_at', 'desc')
                     ->orderBy('updated_at', 'desc')
-                    ->limit(10)
-                    ->get();
+                    ->limit(5)
+                    ->get(['title', 'updated_at'])
+                    ->map(function ($item) use ($now) {
+                        $item->class = '资讯';
+                        $item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
+                        return $item;
+                    });
 
 
-                $res['article'] = $article;
+                var_dump($article, '---1--');
+                $good = Good::where('status', 1)
+                    ->where('user_id', $user_id)
+                    ->orderBy('updated_at', 'desc')
+                    ->get(['name as title', 'updated_at'])
+                    ->map(function ($item) use ($now) {
+                        //去掉name的属性
+                        $item->class = '商品';
+                        $item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
+                        return $item;
+                    });
+                $book = Book::query()
+                    ->where('status', 1)
+                    ->where('user_id', $user_id)
+                    ->orderBy('updated_at', 'desc')
+                    ->get(['title', 'updated_at'])
+                    ->map(function ($item) use ($now) {
+                        //去掉name的属性
+                        $item->class = '书刊';
+                        $item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
+                        return $item;
+                    });
+                //招聘 求职
+                $jobhunting = JobHunting::query()
+                    ->where('status', 1)
+                    ->where('user_id', $user_id)
+                    ->orderBy('updated_at', 'desc')
+                    ->get(['name as title', 'updated_at'])
+                    ->map(function ($item) use ($now) {
+                        //去掉name的属性
+                        $item->class = '求职';
+                        $item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
+                        return $item;
+                    });
+                $jobrecruiting = JobRecruiting::query()
+                    ->where('status', 0)
+                    ->where('user_id', $user_id)
+                    ->orderBy('updated_at', 'desc')
+                    ->get(['title', 'updated_at'])
+                    ->map(function ($item) use ($now) {
+                        //去掉name的属性
+                        $item->class = '招聘';
+                        $item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
+                        return $item;
+                    });
+
+                //通知 投诉
+
+                $notice = Notice::query()
+                    ->where('status', 1)
+                    ->where('user_id', $user_id)
+                    ->orderBy('updated_at', 'desc')
+                    ->get(['title', 'updated_at'])
+                    ->map(function ($item) use ($now) {
+                        //去掉name的属性
+                        $item->class = $item->type == 1 ? "通知" : "公告";
+                        $item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
+                        return $item;
+                    });
+
+                $complaint = Complaint::query()
+                    ->where('status', 1)
+                    ->where('user_id', $user_id)
+                    ->orderBy('updated_at', 'desc')
+                    ->get(['title', 'updated_at'])
+                    ->map(function ($item) use ($now) {
+                        //去掉name的属性
+                        $item->class = "投诉";
+                        $item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
+                        return $item;
+                    });
+
+                // var_dump($jobrecruiting, '-1--------------------11111111111111--');
+
+
+                // var_dump($good, '-3--');
+                // $s = $article->toArray();
+                // var_dump($s, '=====31111111111111111');
+                // 合并两个集合
+                // 合并两个集合,并按 updated_at 倒序排序
+                // $combined = $article->merge($good)->sortByDesc('updated_at');
+                $combined = $article
+                    ->concat($good)
+                    ->concat($book)
+                    ->concat($jobhunting)
+                    ->concat($jobrecruiting)
+                    ->concat($notice)
+                    ->concat($complaint)
+                    ->sortBy(function ($item) {
+                        return Carbon::createFromFormat('Y-m-d H:i:s', $item->updated_at);
+                    });
+                // ->sortBy('updated_at');
+                // var_dump($combined, '--4--');
+                // 转换为数组输出
+                $res['sys_msg'] = $combined->values()->all();
+                // 互动消息
+                $chat_msg = [];
+                // 通知投诉
+                $notice_msg = [];
+                // $res['sys_msg'] = $sys_msg;
+                $chat_single_msg = ChatRecords::where('user_id', $user_id)
+                    ->where('is_read', 0)
+                    ->where('talk_type', 1)
+                    ->orderBy('updated_at', 'desc')
+                    ->limit(5)
+                    ->get(['content', 'updated_at'])
+                    ->map(function ($item) use ($now) {
+                        $item->class = "单聊";
+                        $item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
+                        return $item;
+                    });
+                $chat_group_msg = ChatRecords::where('user_id', $user_id)
+                    ->where('is_read', 0)
+                    ->where('talk_type', 2)
+                    ->orderBy('updated_at', 'desc')
+                    ->limit(5)
+                    ->get(['content', 'updated_at'])
+                    ->map(function ($item) use ($now) {
+                        $item->class = "群聊";
+                        $item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
+                        return $item;
+                    });
+
+                $topic_msg = ChatTopic::where('chat_topics.user_id', $user_id)
+                    ->whereNotNull('chat_topics_reply.updated_at')
+                    ->leftJoin('chat_topics_reply', 'chat_topics.id', '=', 'chat_topics_reply.topic_id')
+                    ->select('chat_topics.title as content', 'chat_topics_reply.updated_at as updated_at')
+                    ->orderBy('updated_at', 'desc')
+                    ->limit(5)
+                    ->get(['content', 'updated_at'])
+                    ->map(function ($item) use ($now) {
+                        $item->class = "话题";
+                        $item->content = $item->content . '话题有回复了';
+                        $item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
+                        return $item;
+                    });
+                // 合并单聊和群聊消息
+                $chat_msg = $chat_single_msg
+                    ->concat($chat_group_msg)
+                    ->concat($topic_msg)
+                    ->sortBy(function ($item) {
+                        return Carbon::createFromFormat('Y-m-d H:i:s', $item->updated_at);
+                    })->values()->all();
+
+                $res['chat_msg'] = $chat_msg;
+                //未读消息
+                $notce_recieve_msg = Notice::where('status', 1)
+                    ->whereJsonContains('re_user_ids', $user_id)
+                    ->where(function ($query) use ($user_id) {
+                        $query->whereNull('read_id')
+                            ->orWhereRaw('NOT JSON_CONTAINS(`read_id`, ?)', [$user_id]);
+                    })
+                    ->orderBy('updated_at', 'desc')
+                    ->limit(5)
+                    ->get(['title', 'updated_at'])
+                    ->map(function ($item) use ($now) {
+                        $item->class = "通知";
+                        $item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
+                        return $item;
+                    });
+                $complaint_recieve_msg = Complaint::where('status', 1)
+                    ->whereJsonContains('re_user_ids', $user_id)
+                    ->where(function ($query) use ($user_id) {
+                        $query->whereNull('read_id')
+                            ->orWhereRaw('NOT JSON_CONTAINS(`read_id`, ?)', [$user_id]);
+                    })
+                    ->orderBy('updated_at', 'desc')
+                    ->limit(5)
+                    ->get(['title', 'updated_at'])
+                    ->map(function ($item) use ($now) {
+                        $item->class = "投诉";
+                        $item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
+                        return $item;
+                    });
+                // 合并消息
+
+                $notice_msg = $notce_recieve_msg
+                    ->concat($complaint_recieve_msg)
+                    ->sortBy(function ($item) {
+                        return Carbon::createFromFormat('Y-m-d H:i:s', $item->updated_at);
+                    })->values()->all();
+
+                $res['notice_msg'] = $notice_msg;
+                // $res['article'] = $article;
                 $res['website']['count'] = Website::where([])->count();
                 $res['website']['count'] = Website::where([])->count();
-                $res['article']['count'] = Article::whereIn('status', [1])->where('admin_user_id', $user_id)->count();
+                $res['article']['count'] = Article::whereIn('status', [1])->where('admin_user_id', $user_id)->count() || [];
                 $res['category']['count'] = Category::where([])->count();
                 $res['category']['count'] = Category::where([])->count();
                 $res['good']['count'] =  Good::whereIn('status', [2])
                 $res['good']['count'] =  Good::whereIn('status', [2])
                     ->where('user_id', $user_id)->count();
                     ->where('user_id', $user_id)->count();
@@ -860,7 +1056,24 @@ class WebsiteService implements WebsiteServiceInterface
         return [];
         return [];
     }
     }
 
 
-    
+    private function timeAgo(string $date, Carbon $now): string
+    {
+        $diff = (new Carbon($date))->diffInMinutes($now);
+
+        if ($diff < 1) {
+            return '刚刚';
+        } elseif ($diff < 60) {
+            return "{$diff} 分钟前";
+        } elseif ($diff < 1440) {
+            return (int)($diff / 60) . " 小时前";
+        } elseif ($diff < 2880) { // 两天内
+            return "1 天前";
+        } elseif ($diff < 7 * 1440) {
+            return (int)($diff / 1440) . " 天前";
+        } else {
+            return (new Carbon($date))->format('Y-m-d');
+        }
+    }
 
 
     /**
     /**
      * 获取分类下的模板
      * 获取分类下的模板
@@ -2262,7 +2475,7 @@ class WebsiteService implements WebsiteServiceInterface
                     $join->on('pc.pid', '=', 'website_category.category_id')
                     $join->on('pc.pid', '=', 'website_category.category_id')
                         ->where('pc.website_id', '=', $data['website_id']);
                         ->where('pc.website_id', '=', $data['website_id']);
                 })
                 })
-                ->select('website_category.category_id','website_category.type', 'website_category.alias', DB::raw('CASE WHEN pc.category_id IS NOT NULL THEN 1 ELSE 0 END as children_count'))
+                ->select('website_category.category_id', 'website_category.type', 'website_category.alias', DB::raw('CASE WHEN pc.category_id IS NOT NULL THEN 1 ELSE 0 END as children_count'))
                 ->first();
                 ->first();
         }
         }
         if (isset($data['foot_pinyin']) && !empty($data['foot_pinyin'])) {
         if (isset($data['foot_pinyin']) && !empty($data['foot_pinyin'])) {
@@ -2747,13 +2960,13 @@ class WebsiteService implements WebsiteServiceInterface
             return Result::success($result);
             return Result::success($result);
         }
         }
     }
     }
-   /**
+    /**
      * 获取网站名称缩写
      * 获取网站名称缩写
      * @param array $data
      * @param array $data
      */
      */
     public function getWebsiteAdkey(array $data): array
     public function getWebsiteAdkey(array $data): array
     {
     {
-       
+
         $result = PinyinHelper::getFirstLetter($data['website_name']);
         $result = PinyinHelper::getFirstLetter($data['website_name']);
         if (empty($result)) {
         if (empty($result)) {
             return Result::error("没有数据", 0);
             return Result::error("没有数据", 0);
@@ -2774,7 +2987,6 @@ class WebsiteService implements WebsiteServiceInterface
             return Result::error("修改失败", 0);
             return Result::error("修改失败", 0);
         }
         }
         return Result::success($result);
         return Result::success($result);
-
     }
     }
     // --自助建站-----------20250522fr----------------------end
     // --自助建站-----------20250522fr----------------------end
 
 
@@ -2943,9 +3155,9 @@ class WebsiteService implements WebsiteServiceInterface
             $clone_website->save();
             $clone_website->save();
             $clone_website->website_url = "[]";
             $clone_website->website_url = "[]";
             $clone_website->save();
             $clone_website->save();
-//            var_dump("返回值:",$clone_website->id);
+            //            var_dump("返回值:",$clone_website->id);
             //克隆网站基础信息  website_template_info website_category
             //克隆网站基础信息  website_template_info website_category
-            $resultWebsiteTemplateInfo = WebsiteTemplateInfo::where([ 'website_id' => $data['website_id']])->first();
+            $resultWebsiteTemplateInfo = WebsiteTemplateInfo::where(['website_id' => $data['website_id']])->first();
             $clone_website_template_info = $resultWebsiteTemplateInfo->replicate();
             $clone_website_template_info = $resultWebsiteTemplateInfo->replicate();
             $clone_website_template_info->website_id = $clone_website->id;
             $clone_website_template_info->website_id = $clone_website->id;
             $clone_website_template_info->save();
             $clone_website_template_info->save();
@@ -2979,7 +3191,7 @@ class WebsiteService implements WebsiteServiceInterface
                 $clonedFooterCategory->website_id = $newWebsiteId;
                 $clonedFooterCategory->website_id = $newWebsiteId;
                 $clonedFooterCategory->save();
                 $clonedFooterCategory->save();
                 $originalFooterContents = FooterContent::where('fcat_id', $footerCategory->id)->get();
                 $originalFooterContents = FooterContent::where('fcat_id', $footerCategory->id)->get();
-                foreach ($originalFooterContents  as $footerContent){
+                foreach ($originalFooterContents  as $footerContent) {
                     $clonedFooterContent = $footerContent->replicate();
                     $clonedFooterContent = $footerContent->replicate();
                     $clonedFooterContent->fcat_id = $clonedFooterCategory->id;
                     $clonedFooterContent->fcat_id = $clonedFooterCategory->id;
                     $clonedFooterContent->save();
                     $clonedFooterContent->save();
@@ -2991,6 +3203,5 @@ class WebsiteService implements WebsiteServiceInterface
             Db::rollBack();
             Db::rollBack();
             return Result::error($e->getMessage(), 0);
             return Result::error($e->getMessage(), 0);
         }
         }
-
     }
     }
 }
 }

+ 28 - 0
app/Model/ChatFriends.php

@@ -0,0 +1,28 @@
+<?php
+
+declare (strict_types = 1);
+
+namespace App\Model;
+
+use Hyperf\DbConnection\Model\Model;
+
+/**
+ */
+class ChatFriends extends Model
+{
+    /**
+     * The table associated with the model.
+     */
+    protected ?string $table = 'chat_friends';
+
+    /**
+     * The attributes that are mass assignable.
+     */
+    protected array $fillable = [];
+
+    /**
+     * The attributes that should be cast to native types.
+     */
+    protected array $casts = [];
+
+}

+ 27 - 0
app/Model/ChatGroups.php

@@ -0,0 +1,27 @@
+<?php
+
+declare (strict_types = 1);
+
+namespace App\Model;
+
+use Hyperf\DbConnection\Model\Model;
+
+/**
+ */
+class ChatGroups extends Model
+{
+    /**
+     * The table associated with the model.
+     */
+    protected ?string $table = 'chat_groups';
+
+    /**
+     * The attributes that are mass assignable.
+     */
+    protected array $fillable = [];
+
+    /**
+     * The attributes that should be cast to native types.
+     */
+    protected array $casts = [];
+}

+ 27 - 0
app/Model/ChatGroupsMember.php

@@ -0,0 +1,27 @@
+<?php
+
+declare (strict_types = 1);
+
+namespace App\Model;
+
+use Hyperf\DbConnection\Model\Model;
+
+/**
+ */
+class ChatGroupsMember extends Model
+{
+    /**
+     * The table associated with the model.
+     */
+    protected ?string $table = 'chat_groups_members';
+
+    /**
+     * The attributes that are mass assignable.
+     */
+    protected array $fillable = [];
+
+    /**
+     * The attributes that should be cast to native types.
+     */
+    protected array $casts = [];
+}

+ 27 - 0
app/Model/ChatRecords.php

@@ -0,0 +1,27 @@
+<?php
+
+declare (strict_types = 1);
+
+namespace App\Model;
+
+use Hyperf\DbConnection\Model\Model;
+
+/**
+ */
+class ChatRecords extends Model
+{
+    /**
+     * The table associated with the model.
+     */
+    protected ?string $table = 'chat_records';
+
+    /**
+     * The attributes that are mass assignable.
+     */
+    protected array $fillable = [];
+
+    /**
+     * The attributes that should be cast to native types.
+     */
+    protected array $casts = [];
+}

+ 27 - 0
app/Model/ChatTopic.php

@@ -0,0 +1,27 @@
+<?php
+
+declare (strict_types = 1);
+
+namespace App\Model;
+
+use Hyperf\DbConnection\Model\Model;
+
+/**
+ */
+class ChatTopic extends Model
+{
+    /**
+     * The table associated with the model.
+     */
+    protected ?string $table = 'chat_topics';
+
+    /**
+     * The attributes that are mass assignable.
+     */
+    protected array $fillable = [];
+
+    /**
+     * The attributes that should be cast to native types.
+     */
+    protected array $casts = [];
+}

+ 27 - 0
app/Model/ChatTopicClass.php

@@ -0,0 +1,27 @@
+<?php
+
+declare (strict_types = 1);
+
+namespace App\Model;
+
+use Hyperf\DbConnection\Model\Model;
+
+/**
+ */
+class ChatTopicClass extends Model
+{
+    /**
+     * The table associated with the model.
+     */
+    protected ?string $table = 'chat_topic_class';
+
+    /**
+     * The attributes that are mass assignable.
+     */
+    protected array $fillable = [];
+
+    /**
+     * The attributes that should be cast to native types.
+     */
+    protected array $casts = [];
+}

+ 27 - 0
app/Model/ChatTopicsReply.php

@@ -0,0 +1,27 @@
+<?php
+
+declare (strict_types = 1);
+
+namespace App\Model;
+
+use Hyperf\DbConnection\Model\Model;
+
+/**
+ */
+class ChatTopicsReply extends Model
+{
+    /**
+     * The table associated with the model.
+     */
+    protected ?string $table = 'chat_topics_reply';
+
+    /**
+     * The attributes that are mass assignable.
+     */
+    protected array $fillable = [];
+
+    /**
+     * The attributes that should be cast to native types.
+     */
+    protected array $casts = [];
+}