//////////////////////////////////////////////////////////////////////////////////////////////
// DO NOT MODIFY THIS FILE //
// This file is automatically generated by ZenStack CLI and should not be manually updated. //
// Source: showcase.zmodel · Generated: 2026-02-23 //
//////////////////////////////////////////////////////////////////////////////////////////////
A comment on a task. Comments do not have descriptions intentionally to test the plugin's handling of undocumented fields.
Category: Work · Defined in: showcase.zmodel
Declaration · showcase.zmodel
model Comment with Timestamps {
id String @id @default(cuid())
body String
task Task @relation(fields: [taskId], references: [id])
taskId String
author User @relation(fields: [authorId], references: [id])
authorId String
@@allow('read', true)
@@allow('create', true)
@@allow('update,delete', author == auth())
@@meta('doc:category', 'Work')
}On this page: Mixins · Fields · Relationships · Access Policies
Reusable field groups mixed into this model.
All fields defined on this entity, including inherited fields from mixins and parent models.
| Field | Type | Required | Default | Attributes | Source | Description |
|---|---|---|---|---|---|---|
createdAt |
DateTime |
Yes | now() |
— | Timestamps | — |
updatedAt |
DateTime |
Yes | — | @updatedAt |
Timestamps | — |
id |
String |
Yes | cuid() |
@id |
— | — |
body |
String |
Yes | — | — | — | — |
task |
Task | Yes | — | @relation(fields: [taskId], references: [id]) |
— | — |
taskId |
String |
Yes | — | — | — | — |
author |
User | Yes | — | @relation(fields: [authorId], references: [id]) |
— | — |
authorId |
String |
Yes | — | — | — | — |
Foreign key relationships to other models in the schema.
| Field | Related Model | Type |
|---|---|---|
author |
User | Many→One |
task |
Task | Many→One |
ZenStack access control rules that determine who can read, create, update, or delete records.
Important
Operations are denied by default. @@allow rules grant access; @@deny rules override any allow.
| Operation | Rule | Effect |
|---|---|---|
| read | true |
Allow |
| create | true |
Allow |
| update,delete | author == auth() |
Allow |
Previous: Activity · Next: Organization