S
S
Sanjar Tolibjonov2019-12-21 09:59:36
Database design
Sanjar Tolibjonov, 2019-12-21 09:59:36

What is the best way to design a database for a transaction system with transaction stages like in freelance exchanges?

I am learning how to make projects (from idea to release, i.e. I want to go through the full cycle: drafting technical specifications, designing a database, developing an MVP), I encountered difficulty in designing a database.
The process is as follows:
When searching for a contractor, the customer will choose, click on “contact”, where he can send a cover letter. A form will be displayed where he will fill in the following fields:
- Subject
- Organization name / name
- Cover letter
Further, after sending, a notification of successful submission will appear, and the “contact” button in the list of bloggers will become unavailable for those to whom the application has already been sent.
The blogger will receive a notification where all the information will be displayed: from which organization, on what topic and what message with the application. There he can accept or refuse the transaction.
If accepted, the customer will be able to send private messages, where they can already discuss all the points and if they agree, the customer will click on the “start deal” button in the dialogue, where he will set the terms of the deal:
- Amount
- Term
Having set the terms of the deal, the customer will click on “ send".
In turn, the blogger can accept or refuse.
My options for implementation:
5dfdc1d42c816899103863.png
What I see as the problem of my solution:
Each time when sending an invitation to discuss an order, an entry will appear in the Deal, but the problem
is that not all the Deal fields are filled in yet. It is not yet clear what the price will be, what the deadline will be (start_date, end_date), these data will be filled in only when the Stage of the Deal changes.
So far, only the value for stage_id is clear.
In addition, there will be a fixed number of stages:
1. Preliminary stage (this is when the deal has not yet begun, but just a correspondence is going on)
2. Start of the deal (the deal price, start_date and end_date are set, i.e. deadlines are set)
3. The deal process ( when the terms and price are set, and direct work is underway);
4. Delivery/checking/editing (when the work is handed over and needs to be checked).
5. Closing the deal (money is transferred, work is accepted, and so on).
I'm confused in my own structure and can't figure out how best to be.

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