Entity

  • Customizable application entities.
  • 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

RouteCreateReadUpdateDelete
/admin/entities
/admin/entities/new
/admin/entities/:entity-slug

Properties

NameTitleTypeDescription
name *NameStringUnique internal identifier, e.g. employee.
slug *SlugStringUnique application URL, e.g. employees would show at /app/:tenant/employees
title *TitleStringCan be a i18n key for multi-language support. e.g. Employee or models.employee.object.
titlePlural *Plural TitleStringCan be a i18n key for multi-language support. e.g. Employees or models.employee.plural.
order *OrderIntOrder of display at the /app sidebar menu.
prefix *PrefixStringUsed for folios, e.g. EMP-0001, EMP-0002...
isFeature *Is FeatureBooleanFor tenant limits, e.g. 100 employees MAX or 20 employees/month.
isAutogenerated *Is AutogeneratedBooleanGenerates views and forms at /app/:tenant/:entity-slug, /app/:tenant/:entity-slug/new and /app/:tenant/:entity-slug/:id.
hasApi *Has APIBooleanGenerates API at /api/:entity-slug (GET, POST) and /api/:entity-slug/:id (GET, PUT, DELETE).
requiresLinkedAccounts *Requires Linked AccountsBooleanRows are shared between 2 tenants.
icon *IconStringSidebar Icon SVG or image URL.
active *ActiveBoolean
properties PropertiesPropertyCustom entity Properties, e.g. Full name (Text), Salary (Number), Birthday (Date)...
apiKeys API KeysApiKeyEntity[]CRUD permissions for API Keys
webhooks WebhooksEntityWebhook[]POST, PUT, GET, DELETE webhooks, e.g. for Zapier communication.

Model

model Entity {
  id                     String                       @id @default(cuid())
  createdAt              DateTime                     @default(now())
  updatedAt              DateTime                     @updatedAt
  name                   String                       @unique
  slug                   String                       @unique
  order                  Int                          @unique
  prefix                 String                       @unique
  title                  String // i18n key, eg: models.contract.object
  titlePlural            String //  i18n key, eg: models.contract.plural
  isFeature              Boolean
  isAutogenerated        Boolean
  hasApi                 Boolean
  requiresLinkedAccounts Boolean
  icon                   String
  active                 Boolean
  properties             Property[]
  rows                   Row[]
  apiKeys                ApiKeyEntity[]
  webhooks               EntityWebhook[]
}

We respect your privacy.

This website uses cookies to help personalize your online experience. Learn more.