I need some help with a value object. Consider the following example.
I have entity Card which has pan currency(USD, EUR, GBP) and card type (Visa, Visa Electron, Mastercard). I think currencies and card types are value objects and they are stored in the source code. According to DDD value objects don't have repositories.
- The question is how to fill the dropdowns of currencies and a card types in the interface when creating new Card entity.
- Where to put that classes in Application, Domain or Infrastructure layer and how to retrieve data from them.
A simple example would be priceless"
UPDATE1
That was my first approach but.. I use currencies in other entities like MoneyTransfer there i use EUR USD GBP and a few more so i have to create one more enum
public enum MoneyTransferCurrency{
USD, EUR, GBP and a few other
}
This way i duplicate some currencies and if we stop processing payments in USD i have to find all enums and delete the USD currency.