//////////////////////////////////////////////////////////////////////////////////////////////
// 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 //
//////////////////////////////////////////////////////////////////////////////////////////////
Records significant events for audit and activity feed purposes.
Category: Audit · Since: 2.0 · Defined in: showcase.zmodel
Declaration · showcase.zmodel
model Activity with Timestamps {
id String @id @default(uuid())
action String
detail String?
user User @relation(fields: [userId], references: [id])
userId String
task Task? @relation(fields: [taskId], references: [id])
taskId String?
@@allow('read', true)
@@deny('update,delete', true)
@@meta('doc:category', 'Audit')
@@meta('doc:since', '2.0')
}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 | uuid() |
@id |
— | — |
action |
String |
Yes | — | — | — | — |
detail |
String? |
No | — | — | — | — |
user |
User | Yes | — | @relation(fields: [userId], references: [id]) |
— | — |
userId |
String |
Yes | — | — | — | — |
task |
Task? | No | — | @relation(fields: [taskId], references: [id]) |
— | — |
taskId |
String? |
No | — | — | — | — |
Foreign key relationships to other models in the schema.
| Field | Related Model | Type |
|---|---|---|
task |
Task | Many→One? |
user |
User | 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 |
| update,delete | true |
Deny |
Next: Comment