docs: add Repository + DTO pattern guidance for Prisma type isolation (#25730)
* docs: add Repository + DTO pattern guidance for Prisma type isolation Co-Authored-By: [email protected] <[email protected]> * docs: add 'Why this pattern?' section explaining benefits of Repository + DTO Co-Authored-By: [email protected] <[email protected]> * docs: condense Repository + DTO pattern guidance for readability Co-Authored-By: [email protected] <[email protected]> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
3ebac0194e
commit
68cdfd42b1
2 files changed
+53
-2
No files matched your search
@@ -27,6 +27,12 @@ import { User } from "@prisma/client";
|
||||
|
||||
- Use React children and context instead of passing props through multiple components
|
||||
|
||||
### ORM and Types
|
||||
|
||||
- Never import `@calcom/prisma/client` in features, services, UI, or handlers.
|
||||
- Use repository DTOs or domain types instead.
|
||||
- See "Repository + DTO Pattern and Method Conventions" in the knowledge base for details and examples.
|
||||
|
||||
### Security Rules
|
||||
|
||||
```typescript
|
||||
|
||||
Reference in new issue
Block a user