Table of operator/sellers users with fields such as: name, phone, email, and product.
Each operator can have many products so I have a table of products
Each product can be marked as primary or principal; here I have used a boolean to mark the field. The first problem is that more than one boolean can be marked, and I must allow only one to be marked. Another problem I have is that in the operator’s form, I must allow them to choose which will be the primary product among all the ones they have associated/assigned…
I don’t know which columns to work with for this problem, could you guide me?
I think you can move it to be a field on the operators table. Have a choice component for them to choose the product ID to be their primary one, from the list of assigned products. That way you can make sure only one product is chosen.
Yes, then the sale is managed by an administrator who selects the operator and the product. After that, the admin upload an image. This image is processed by the AI, which extracts some information about the sell. Then, the admin confirms or modifies the AI’s information and creates the sale.