Original post

Hey Guys,
I wanna make a product struct that contains some key-value depends on every product for example for a mobile we have this property: “screen-size”: “5” and … and for another product like a pot: “deep”: 4 and … I must make property in my struct that has JSON type and save it into database this field as JSON?
and what about permissions for users? I must do the same?

more explain:
I wanna make e-commerce. that we have some product here that admins can add into the database and customers can see and buy. every product has some property side of the name of product and price of product and … we have a field that is property contains dynamic value per every product for example for mobile we have some property (key-value) base and for a pot in the kitchen, we have some other property (again key-value base). now how I must implement this. for example, I know the name of product has a string type in product struct. and price has float type but this property must have what type in and Postgres DB