Skip to content

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:

AnnotationTargetDescription
@AdminOnlyClassRestricts an entity to the Admin role when using default roles
@SquizyEntityClassMarks a JPA entity as Squizy-managed, generating CRUD stack automatically
@SquizyFieldFieldCustomizes the behavior and appearance of individual entity fields
@ColorEnum valueAssigns a color to an enum value for visual distinction
@DependsOnFieldCreates cascading dependencies between fields (e.g., cascading dropdowns)
@SensitiveFieldFieldMarks a field as sensitive, restricting read access
@OwnerFieldFieldMarks a field as the record owner, restricting access to the owner and admins
@DefaultViewClassSets the entity as the default landing view in the UI
@DisplayFormatClass, FieldDefines how an entity is represented as text
@SortingExpressionClass, FieldDefines the default sorting behavior