N
N
nerabio2017-09-22 12:07:03
Yii
nerabio, 2017-09-22 12:07:03

Implementing custom fields algorithm in DB and working with them via Active Record Yii2?

Good afternoon,
Tell me how the table architecture for custom fields is implemented. For example, there is a standard table "Tasks" in which there are various fields that will be displayed to everyone, but it is also possible to create additional. a field with any value, filtering is performed on it and it is available either to everyone or not.
I suppose, in a separate table "UserFields" there are fields:
id, type, clientid, value
1. Check if the client has user fields (for example, there are)
2. Then, when LEFT JOIN it
, Or have a separate table for each type.
In Yii2, a separate AR model pulls up fields, defining accessibility logic. It's the same to use in the grid.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mitaichik, 2017-09-22
@nerabio

Google about yii2 eav. In general, if the storage is not important, can look in the direction of MongoDB?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question