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

外部キーをエンティティーに置き換える #26

Open
1 of 3 tasks
testusuke opened this issue Aug 19, 2023 · 1 comment · Fixed by #28
Open
1 of 3 tasks

外部キーをエンティティーに置き換える #26

testusuke opened this issue Aug 19, 2023 · 1 comment · Fixed by #28

Comments

@testusuke
Copy link
Member

testusuke commented Aug 19, 2023

概要
フロントエンドの実装を考えて、バックエンド側で外部キーをエンティティーに置き換えてレスポンスする

Refactor: Dependency Injectionを導入
DI,DDDを導入する際にこのissueが解決する

例:

{
  "id": 1,
  "name": "Team A",
  "usersIds": [
    1, 3
  ]
}

以下のようにusersに置き換える。

{
  "id": 1,
  "name": "Team A",
  "users": [
    {
      "id": 1,
      "name": "User A"
    },
    {
      "id": 3,
      "name": "User A"
    }
  ]
}

タスク

  • Entity::serializable()関数を再設計or廃止して別のものにする
  • DTOからレスポンスを作成
  • レスポンスのJSONを直す
@testusuke testusuke self-assigned this Aug 19, 2023
@testusuke testusuke moved this to Todo in Sports day Aug 19, 2023
@testusuke testusuke moved this from Todo to Todo - Backend in Sports day Aug 19, 2023
@testusuke testusuke moved this from Todo - Backend to In Progress in Sports day Sep 2, 2023
@testusuke testusuke linked a pull request Sep 2, 2023 that will close this issue
3 tasks
@testusuke testusuke mentioned this issue Sep 2, 2023
3 tasks
@github-project-automation github-project-automation bot moved this from In Progress to Done in Sports day Sep 16, 2023
@testusuke testusuke reopened this Sep 16, 2023
@testusuke testusuke moved this from Done to Todo - Backend in Sports day Sep 16, 2023
@testusuke
Copy link
Member Author

部分的に導入するのはアリだと思う。ただ時間がないので次回以降でもいいかもしれない。
low

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Todo - Backend
Development

Successfully merging a pull request may close this issue.

1 participant