<!--
title: Consistent code organization
domain: app-frameworks
topic: Code Style
language: Prisma
source: elie222/inbox-zero
updated: 2025-07-03
url: https://awesomereviewers.com/reviewers/inbox-zero-consistent-code-organization/
-->

Maintain consistent patterns when organizing code elements within schema files. Place standard fields (like IDs and timestamps) first in all models to establish a predictable structure. Group similar elements together and position enum definitions at the bottom of schema files.

Example:
```prisma
model SomeModel {
  // Standard fields first
  id        String   @id @default(cuid())
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
  
  // Model-specific fields next
  name      String
  status    Status
  
  // Relations last
  relatedItems RelatedItem[]
}

// Enums at the bottom of the file
enum Status {
  ACTIVE
  INACTIVE
}
```

This organization pattern improves code readability, makes navigation easier across the codebase, and helps team members quickly understand the structure of each schema file.
