0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

DDDのエンティティと値オブジェクト【僕の備忘録】

Last updated at Posted at 2020-05-02

##エンティティとは
ライフサイクルを管理する必要がある=状態が変化していくオブジェクト
IDを持ちそれによって同一性を識別できるオブジェクト
例)
社員
-社員ID
-名前
-所属
-役職

##値オブジェクトとは
ライフサイクルを管理する必要がない=不変なオブジェクト
プロパティを複数持ち、相互に関係して初めて意味を成す
例)
通貨
-金額(100)
-単位(円)

##参考にさせて頂いたサイト
https://codezine.jp/article/detail/10038
https://codezine.jp/article/detail/10184

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?