DDD: DTO usage with different logic
问题 I am currently working on a DDD project and recently faced an issue regarding the use of DTOs. I have the following DTO in my domain (code is in php but could be in any language): class TranslationDto { private $locale; private $text; public function getLocale(...); public function getText(...); } The goal is that the UI will give the domain a DTO with a locale and its corresponding text. So for example, if the locale "FR" is not translated, the DTO will look like the following: // UI =>