Skip to content

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

@testusuke

Description

@testusuke

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

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を直す

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions