Property

  • Belongs to an Entity.
  • Multiple types supported: NUMBER, TEXT, DATE, ENTITY, MEDIA, and SELECT.

Life Cycle

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

Properties

NameTitleTypeDescription
entityId *EntityEntityParent Entity.
order *OrderIntOrder of display at generated views and forms.
name *NameStringInternal identifier.
title *TitleStringCan be a i18n key, e.g. First name or models.employee.firstName.
type *TypePropertyTypeNUMBER, TEXT, DATE, ENTITY, MEDIA, or SELECT
isDynamic Is DynamicBooleanIs a custom property. Uncheck if you have your own database model (not all property types are supported for this).
isDefault Is DefaultBooleanThere are 3 main default properties on every row: Folio, createdAt, and createdByUser.
isHidden Is HiddenBooleanHides at autogenerated forms.
pattern PatternStringNative input pattern validation.
options OptionsPropertyOption[]For [type]=SELECT properties.
values Row ValuesRowValue[]Row property value.

Model

model Property {
  id         String           @id @default(cuid())
  entityId   String
  entity     Entity           @relation(fields: [entityId], references: [id], onDelete: Cascade)
  order      Int
  name       String
  title      String
  type       Int
  parentId   String?
  parent     Property?        @relation(name: "parentProperty", fields: [parentId], references: [id], onDelete: Cascade)
  isDynamic  Boolean
  isDefault  Boolean
  isRequired Boolean
  isHidden   Boolean
  pattern    String?
  options    PropertyOption[]
  values     RowValue[]

  @@unique([entityId, order])
  @@unique([entityId, name])
  @@unique([entityId, title])
}

cookies.titleSmall

cookies.descriptionSmall shared.learnMore.