How do I implement a queue of users in Symfony? [closed]

I am creating a website where clients register for an appointment and the workers (signed-in users) can choose the clients which they will be responsible for. Whoever chooses the client first, gets it. But I want to implement a queue for other workers if the client has already been chosen by another person and this person decides to cancel the client. I want the first person in queue to get the client assigned to him upon cancelling. How do I approach it? How should the whole infrastructure look like? Do I need a separate table in the database for the queue, or do I have some kind of an array as one of the “Clients” entity’s attributes? How should the functions in the controller look like?

Don’t know if I did a good job at explaining everything, so to make everything clearer, I tried to make a scheme of how it all works:
The scheme

This basically demonstrates how one of the CRUD elements should behave.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *