Appearance
Annotation Reference
Annotations are the primary mechanism for configuring entity behavior in Squizy. By adding annotations to your JPA entity classes and fields, you control how Squizy generates the CRUD API, UI components, validation rules, and access restrictions — all without writing boilerplate code.
The following table lists all available annotations:
| Annotation | Target | Description |
|---|---|---|
| @AdminOnly | Class | Restricts an entity to the Admin role when using default roles |
| @SquizyEntity | Class | Marks a JPA entity as Squizy-managed, generating CRUD stack automatically |
| @SquizyField | Field | Customizes the behavior and appearance of individual entity fields |
| @Color | Enum value | Assigns a color to an enum value for visual distinction |
| @DependsOn | Field | Creates cascading dependencies between fields (e.g., cascading dropdowns) |
| @SensitiveField | Field | Marks a field as sensitive, restricting read access |
| @OwnerField | Field | Marks a field as the record owner, restricting access to the owner and admins |
| @DefaultView | Class | Sets the entity as the default landing view in the UI |
| @DisplayFormat | Class, Field | Defines how an entity is represented as text |
| @SortingExpression | Class, Field | Defines the default sorting behavior |