Answer the question
In order to leave comments, you need to log in
What is the best way to associate contact details with a YII2 model?
There is a catalog of organizations, a catalog of vacancies, a catalog of announcements. Each entity from these tables can have several contact data both by type and quantity. There is also a contact data table, a one-to-many relationship. The contact data table will contain the following fields:
id - primary key
content_type - тип связанного контента
content_id - id связанного контента
contact_type - тип контактных данных
contact_title - название контактных данных
contact_data - непосредственно контактные данные
contact_description - описание контактных данных
catalog | 004 | phone | Александр | 8 555 333 222 | администратор
market | 543 | address | - | ул. Ленина, 52 | магазин оптовой продажи
vacancies | 010 | email | Оптовые продажи | [email protected] | -
catalog | 005| url | - | magazin.domain | -
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question