Concepts
Concepts are formalized value types that wrap a primitive. They give every domain value a precise, strongly-typed name — you never pass a raw Uuid or String around — and they are where compliance is declared. Attributes control compliance behavior: Chronicle applies @pii and @sensitive rules automatically wherever the concept is used.
Syntax
Section titled “Syntax”concept <Name> : <PrimitiveType> [<attributes>]
concept <Name> : Enum <value>+Primitive types
Section titled “Primitive types”Uuid, String, Int, Decimal, Bool, Date, DateTime
Attributes
Section titled “Attributes”| Attribute | Meaning |
|---|---|
@pii | The value is personally identifiable information. Chronicle manages it and can erase it for GDPR compliance. |
@sensitive | The value is sensitive and handled under Chronicle’s sensitivity rules. |
Examples
Section titled “Examples”concept InvoiceId : Uuidconcept EmailAddress : String @piiconcept NationalIdNumber : String @pii @sensitiveconcept DateOfBirth : Date @piiEnum concepts
Section titled “Enum concepts”An enum concept declares a fixed set of values as an indented list:
concept InvoiceStatus : Enum draft sent paid overdue cancelled
concept PaymentTerms : Enum net30 net60 immediateAttribute inheritance
Section titled “Attribute inheritance”When a concept is used as a property type on a command or event, its attributes are inherited — you never annotate at the property level. Declaring EmailAddress as @pii once means every event property, command property, and read model field typed as EmailAddress is treated as PII automatically.