0x7D15
September 21st, 2022

Imagine you’re building a system where users can perform transactions such as selling and buying tokens. For each token, every user has a dedicated wallet.

Our database consists of four entities: User, Wallet, Token, and Transaction.

If you're using Prisma, you can generate this with `prisma-dbml-generator`
If you're using Prisma, you can generate this with `prisma-dbml-generator`

The transaction has a field delta that is either a positive or negative number. When positive, that is the number of tokens purchased. When negative, it is how many tokens were sold.