Yii ActiveRecord is tied to the table
But he does it in a few abstractions...
In the Yii2 for the work with database answers
https://github.com/yiisoft/yii2/blob/master/framew... And how better to do, to bind these classes to the entity or to the table?
You kind of work through the repository
Here is a good and popular pattern that solves your case:
design-pattern.ru/patterns/data-mapper.html