Таблица список «auto»
+---------+--------------+--------------------+------+-----+---------+----------------+---------------------------------+--------------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+---------+--------------+--------------------+------+-----+---------+----------------+---------------------------------+--------------+
| id | int(11) | NULL | NO | PRI | NULL | auto_increment | select,insert,update,references | |
| name | varchar(255) | utf8mb3_general_ci | NO | UNI | NULL | | select,insert,update,references | имя |
+---------+--------------+--------------------+------+-----+---------+----------------+---------------------------------+--------------+
+---------+--------------+--------------------+------+-----+---------+----------------+---------------------------------+-------------------------------------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+---------+--------------+--------------------+------+-----+---------+----------------+---------------------------------+-------------------------------------+
| id | int(11) | NULL | NO | PRI | NULL | auto_increment | select,insert,update,references | |
| auto_id | int(11) | NULL | NO | | NULL | | select,insert,update,references | Идентификатор узла |
| value | varchar(255) | utf8mb3_general_ci | NO | | NULL | | select,insert,update,references | Значение |
+---------+--------------+--------------------+------+-----+---------+----------------+---------------------------------+-------------------------------------+
Как подойти к решению в философии Yii2:
- Создать две Models и один Controller?
- Создать одну Model со сложным запросом SQL?