Row
- Custom Entity Rows created by a Tenant.
- Autogenerated view at /app/:tenant/:entity-slug.
- Autogenerated form at /app/:tenant/:entity-slug/new.
- Autogenerated view and form at /app/:tenant/:entity-slug/:id.
Life Cycle
Route | Create | Read | Update | Delete |
---|---|---|---|---|
/app/:tenant/:entity-slug | ||||
/app/:tenant/:entity-slug/new | ||||
/app/:tenant/:entity-slug/:id | ||||
/api/:entity-slug | ||||
/api/:entity-slug/:id |
Properties
Name | Title | Type | Description |
---|---|---|---|
entityId * | Entity | Entity | Parent Entity. |
tenantId * | Tenant | Tenant | |
folio * | Folio | Int | Uses entity.[prefix], e.g. EMP-0001. |
createdByUserId | User | User | |
createdByApiKeyId | API Key | ApiKey | |
linkedAccountId | Linked Account | LinkedAccount | |
logs | Logs | Log[] | Row Audit Trails/events, e.g. Created, Updated, and Deleted. |
Model
model Row {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
folio Int
entityId String
entity Entity @relation(fields: [entityId], references: [id], onDelete: Cascade)
tenantId String
tenant Tenant @relation(fields: [tenantId], references: [id], onDelete: Cascade)
createdByUserId String?
createdByUser User? @relation(fields: [createdByUserId], references: [id], onDelete: Cascade)
createdByApiKeyId String?
createdByApiKey ApiKey? @relation(fields: [createdByApiKeyId], references: [id], onDelete: Cascade)
linkedAccountId String?
linkedAccount LinkedAccount? @relation(fields: [linkedAccountId], references: [id], onDelete: Cascade)
logs Log[]
values RowValue[]
}