This commit is contained in:
2025-06-27 17:04:25 +08:00
parent c30ff3cca1
commit c8eb5f33ee
8 changed files with 147 additions and 46 deletions
+2 -3
View File
@@ -31,9 +31,7 @@ class ArticleService extends BaseService
'fields' => ['id', 'locale', 'title', 'subtitle', 'cover', 'content', 'user_id', 'is_top', 'sort', 'status', 'publish_time', 'created_at', 'updated_at'],
'relations' => [
'creater' => ['id', 'nickname',],
'comment' => ['id', 'article_id', 'content', 'avatar', 'name',],
// 'translation' => ['model_id', 'name'],
// 'brand.translation' => ['brand_id', 'name']
// 'comment' => ['id', 'article_id', 'content', 'avatar', 'name',],
],
'sorts' => [
['field' => 'is_top', 'direction' => 'desc'],
@@ -54,6 +52,7 @@ class ArticleService extends BaseService
],
'fields' => ['id', 'locale', 'title', 'subtitle', 'cover', 'content', 'user_id', 'is_top', 'sort', 'status', 'publish_time', 'created_at', 'updated_at'],
'relations' => [
'creater' => ['id', 'nickname',],
'comment' => ['id', 'article_id', 'content', 'avatar', 'name',],
// 'translation' => ['model_id', 'name']
],