Prisma Data Modeling Skill
This skill ensures the database scales well and maintains data integrity for the Midas Web Concept.
🏗️ Modeling Standards
1. Naming Conventions
- •Models: PascalCase (e.g.,
LimitOrder,PortfolioItem). - •Fields: camelCase (e.g.,
createdAt,userId). - •Foreign Keys: Use
userIdpointing toUser.
2. Monetary Fields
ALWAYS use the following definition for price/balance fields:
prisma
amount Decimal @db.Decimal(19, 4)