Supposed I have a model Relleno(relleno_id, descripcion)
with records:
(1, Activo)
(2, Inactivo)
(3, DNI)
(4, LC)
(5, LE)
Then, I want to connect 2 entities with this model: Chofer(nombre, estado)
and Cliente(modelo, tipdoc)
, where
- Chofer.estado can have the values 1 or 2 of Relleno.relleno_id, and
- Cliente.tipdoc can have the values 3, 4 or 5 of Relleno.relleno_id
Since the names of the fields in the entities aren't the same (for example, in Relleno is *relleno_id* but in Chofer is estado) I am confused about how to model the corresponding migrations and associations.
Could you help me?