问题
These are the options I see that can help solve "Rails 5 - Object Relation Impedence and how to structure multiple inherited classes/tables" TL;DR - the Object Table Impedance ORM problem.
Abstract base class, with each child class having its own table (ie storing the common attributes for each type in its own table)
STI, just put everything in one Base class and Table, and create all child attributes in that table, but have the sub-classes (ie your other Rails models) inherit from that Base Class.
Sequel db (supports Class Table Inheritance)
Dan Chak's 'Enterprise Rails' solution (here), seems quite old but looks promising
Composition
Are there any others?
来源:https://stackoverflow.com/questions/39524564/what-are-the-possible-solutions-to-oo-table-inheritance-ie-sti-mti-cli-in-rai