1
I’m starting in the area, I have the following scenario in my back end done in Rails: I want to implement a parent class:
Equipment: PK ID Brand ...
And some child classes
Printer: ID_EQUIPAMENTO PK and FK ...
Computers: ID_EQUIPAMENTO PK and FK ...
Telephones: ID_EQUIPAMENTO PK and FK ...
Among other things
But I have 2 problems, the first is how to define the primary key of the parent class to be the primary key of the child classes. The other is how to implement this in the controller and routes.
I’ve been stuck in this for a while