Best way to structure a NoSQL payment schema

Viewed 126

I designed this schema/structure for an online marketplace where users can buy products from sellers.

Each seller has an account (Funds) where they can view their payments, withdrawal history, and user refunds.

However, there are a two issues I have noticed in this design.

  1. payment is repeated in the OrderPayments and Orders collections.
  2. date is repeated in the Withdrawals and Payments collections.

Should I remove the repeated fields, or does it not matter?

Also, are there any other flaws with this design? Thank you.

Proposed backend schema

0 Answers
Related