We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
下面代码意图是可以在url query里使用类似filter=deleted=true查询删除掉的对象
filter=deleted=true
wayne/src/backend/controllers/base/parambuilder.go
Lines 37 to 46 in 620d4a0
wayne/src/backend/models/user.go
Lines 271 to 278 in 620d4a0
The text was updated successfully, but these errors were encountered:
提个 pr 吧。
Sorry, something went wrong.
emm,这个不太好改,因为 namespace_user 和 user 表之间有关联关系。 现有的逻辑是硬删除,在 user 表中删除的时候由于 User 这个 struct 里面指针有 namespace_user 可以一起将 namespace_user 中的对应内容删除。 如果要改成 soft delete,将 user 表中的 deleted 置为 true,那么 namespace_user 中的逻辑如何处理?可以考虑增加一个 deleted 字段。 数据库修改之后就好改了,还需要修改后端的 api 中 user 和 namespace_user 的默认请求方式(默认不显示 deleted 为 true 的内容),以及修改前端(需要加入硬删除的操作?)
总体来说可能还需要探讨一下产品设计和逻辑。
Successfully merging a pull request may close this issue.
下面代码意图是可以在url query里使用类似
filter=deleted=true
查询删除掉的对象wayne/src/backend/controllers/base/parambuilder.go
Lines 37 to 46 in 620d4a0
但是我增加用户然后删除后看到数据库里记录被删除了,看了下是强删除
wayne/src/backend/models/user.go
Lines 271 to 278 in 620d4a0
而不是把User的deleted字段 set为 true
The text was updated successfully, but these errors were encountered: