Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: 人物/角色/章节的目录收藏 #247

Open
RanKKI opened this issue Nov 10, 2022 · 13 comments
Open

[Feature Request]: 人物/角色/章节的目录收藏 #247

RanKKI opened this issue Nov 10, 2022 · 13 comments
Labels
enhancement New feature request

Comments

@RanKKI
Copy link
Member

RanKKI commented Nov 10, 2022

目录项目只支持 Subject 类, 对于人物、角色、章节都是错误数据。

目前针对这三个项目,都是拿其 ID 去 subject 库中找。

添加到目录,也不支持这三个分类

Bug2:
/v0/indices/{index_id}/subjects 中缺少对类别(Subject,人物,角色,章节)的过滤 (对应数据库 Cat 字段)

@RanKKI RanKKI added the bug label Nov 10, 2022
@trim21
Copy link
Contributor

trim21 commented Nov 10, 2022

你要提pr吗(

话说我才知道能收藏章节…

@RanKKI
Copy link
Member Author

RanKKI commented Nov 10, 2022

正在看代码... 我还没理解线上怎么存这些数据的

@trim21
Copy link
Contributor

trim21 commented Nov 10, 2022

这么一说对应的表好像没导出来…

@RanKKI
Copy link
Member Author

RanKKI commented Nov 10, 2022

总算看明白了.. php 太伤眼睛了

ORM 目录这里,我打算把关联关系干掉, 因为要到三个不同的表查内容(Subject,章节,人物),

就自己在代码里查,合并信息。

我在想想怎么写接口,因为涉及到三个结构, 可能直接 interface{} 解决了...

@trim21 trim21 added enhancement New feature request and removed bug labels Nov 10, 2022
@trim21
Copy link
Contributor

trim21 commented Nov 11, 2022

不对啊,这不是个bug /v0/indices/{index_id}/subjects 就应该是条目啊....人物什么的应该放到对应的 /v0/indices/{index_id}/persons 路由上

@trim21 trim21 changed the title [BUG]: 目录获取 subjects 只支持动画 [Feature Request]: 人物/角色/章节的目录收藏 Nov 11, 2022
@RanKKI
Copy link
Member Author

RanKKI commented Nov 11, 2022

我觉得是获取所有类别,然后通过 url 参数去做过滤比较好,不然,我想拿目录里的条目还要发3、4个请求... 有点多余

@trim21
Copy link
Contributor

trim21 commented Nov 11, 2022

我没明白你说的是个什么场景...为什么要3、4个请求

@RanKKI
Copy link
Member Author

RanKKI commented Nov 11, 2022

就比如我要打开目录,里面有4种不同类型的条目 Subject, Person... 那我要数据的时候,就需要请求 /v0/indices/{index_id}/subjects/v0/indices/{index_id}/person..

我对这个 api 的理解是获得目录下所有条目(包括 subject, epsoide, person..),如果客户端有需要,通过 cateogry=xxx 去过滤

/v0/indices/{index_id}/subjects?category=person

@trim21
Copy link
Contributor

trim21 commented Nov 11, 2022

我的理解 人物角色章节都不是 subjects (条目)

@RanKKI
Copy link
Member Author

RanKKI commented Nov 12, 2022

这儿比较迷,那就按照现有的设计吧 /{index_id}/person /{index_id}/subjects /{index_id}/episodes... 这样吧

@trim21
Copy link
Contributor

trim21 commented Nov 12, 2022

这儿比较迷,那就按照现有的设计吧 /{index_id}/person /{index_id}/subjects /{index_id}/episodes... 这样吧

现在不就有/subjects/{id} /persons/{id} /episodes/{id} 等一系列路由吗...

@RanKKI
Copy link
Member Author

RanKKI commented Nov 12, 2022

我的错我的错, 我省略了一些东西。
是指 /v0/indices/{index_id}/persons 这些

@trim21
Copy link
Contributor

trim21 commented Nov 12, 2022

我的错我的错, 我省略了一些东西。 是指 /v0/indices/{index_id}/persons 这些

我明白你省略了前缀,我是说我感觉subjects/persons等区分挺清晰地...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request
Projects
None yet
Development

No branches or pull requests

2 participants