I'm working on a data model for SIP routing information. Let's take as example the telephone number 1-212-123456. Two service providers A and B has the routing information (for example, IP addresses) to establish a SIP session to this telephone number.
Thus, in my model, I have an entity called TelephoneNumber. My question is: does it make sense to define the TelephoneNumber element as a value object?
First, a telephone number exists only in the context of one or more service providers. If no service provider knows the routing information for this telephone number, there is no reason for the latter to exist.
Second, if TelephoneNumber is a value object, there will be two instances of the same telephone number, one for each service provider. In this case, the primary key of the entity would include a foreign key referencing ServiceProvider. In this case, I see there is some data duplication.
Thanks