Designing Question: why there are attributes in objects (users, groups, devices ..) and there is an object attributes?

JavaDev4 years ago

hi all
wish u the best
i have installed traccar, i took a look onto the database and the code.
i have noticed the there is a table : tc_attributes which has relations with users, groups devices
and there is a column in these tables named attributes
can some one tell me the idea, the use of each one, the deference ....?
thanks a lot

Anton Tananaev4 years ago

Attributes are additional parameters in a JSON format.

JavaDev4 years ago

i have created a computed attribute "antiMotion", this attribute saved in attributes table.
does that mean, just computed attributes are saved in attributes table and any attribute definition for other objects like devices for example saved in the object table?

thanks for ur reply mr Anton.

Anton Tananaev4 years ago

Wait, I think I misread your original question. Attributes table is for computed attributes. They can be assigned to users/groups/devices.

JavaDev4 years ago

i m really sorry, but i m trying to have a full understand.
now, i opened notifications for creating a new one, also this object have attributes, which i can set any string and value (i mean not even a compobox choices), what is the objectives of attributes here?

Anton Tananaev4 years ago

I think you are mixing two completely different concepts:

  • Attributes table is for computed attributes
  • Attributes field is for additional parameters for the object

Specifically for notifications, you might want to store some configuration there. Currently it's unused, as far as I know.

JavaDev4 years ago

thanks Mr Anton, appreciate ur help.
now its understood. i will continue analyzing the functionality.
wish u good time.