Prisma, Authorization, Typescript, Web Development.
Resource { id Int @id @default(autoincrement()) name String published Boolean @default(false) owner User @relation(fields: [ownerId], references: [id]) ownerId Int // user can create resources if he has enough reputation @@allow('create', auth().reputation >= 100) // published resources can be read