I want to refactor my project with DDD. There are three object, such as bankcard, channel and user. There relation as follows:
- A bankcard can sign a contract with multi channel.
- A user can bind multi bankcards.
- A bankcard can be bound to multi users. Now the project has three tables, such as bankcard table, bankcards and channels contract table, bankcards and users relationship table. I want to design bankcard as entity, user and channel as value object(user entity and channel entity be maintained at other domain). So how should I design the aggregate root. Consider bankcard as aggregate and the channel list, user list as aggregate root's property, or design bankcard, bankcard-sign-contract, bankcard-user-relationship as aggregate root?
Aucun commentaire:
Enregistrer un commentaire