N
N
NikSIk312019-12-01 03:49:11
Laravel
NikSIk31, 2019-12-01 03:49:11

What is the best way to organize?

Good day!
I made the site quite a bit, and now when something needs to be added or changed, problems arise, in particular, the biggest one is with user balances.
There are two types of users on the site: customers and performers. If the order has been placed, then the contractor can write the cost of execution and for the customer it will be multiplied by the multiplication factor for this contractor. Several performers can respond to one order at once - these are offers (accordingly, they have a cost that the contractor offered) (1)
If the customer is satisfied with the cost, he chooses the contractor and the cost is entered into the order (2)
I have implemented this crookedly, I already I don't remember how. But the bottom line is that it's very inconvenient and trivial to add new functionality with a cost - and I'm already confused about what and how.
I remember that the program was on the Broadcast: i.e. there I had a status check and from this it multiplied or gave out the original, but when broadcasting, the users seem to change and this does not work (well, for example, the performer triggered the event, but it will go to the customer, and this is a different status) Well, this was the problem.
The question is how best to make it so that later, depending on the status, it would be possible to display the cost without problems (for customers, the cost = the original cost * the coefficient of the contractor). Am I correct in entering the cost of the customer in the order, and the cost of the contractor in the offer?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question