-
-
Notifications
You must be signed in to change notification settings - Fork 126
Closed
Description
abstract model Base {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt()
//Logged-in users can view
@@allow('read', auth() != null)
}
model Post extends Base
{
title String
content String?
viewCount Int @default(0)
}The generated prisma file should be:
/// @@allow('all', auth() != null && published)
model Post {
id Int @id() @default(autoincrement())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt()
published Boolean @default(true)
zenstack_guard Boolean @default(true)
zenstack_transaction String?
title String
content String?
viewCount Int @default(0)
comment Comment[]
@@index([zenstack_transaction])
}Metadata
Metadata
Assignees
Labels
No labels