Act like a developer and write me a prisma schema of a user
- User
Act like a developer and write me a prisma schema of a user
Assistant
Here is a sample Prisma schema defining a User model:
codemodel User { id Int @id @default(autoincrement()) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt email String @unique name String? role Role @default(USER) posts Post[] } enum Role { USER ADMIN }This defines a User model with fields like id, createdAt, updatedAt, email, name, and role. The email field is marked as unique to prevent duplicate emails. The role field uses a Role enum with possible values of USER and ADMIN.
The User model also has a relation to Post models via the posts field. This allows querying a user's posts.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.