- (define-object-type name table fields...)syntax
Creates an object type. An Object's field list can consist of attribute types or property types. Attributes are simple types that are stored in a single column in the object's database table. Properties are more complex types that are stored in their own database table. An Object's property fields can have zero or more values.
(define-object-type email-address 'attrib_email_address (domain-part text required constant) (local-part text required constant) (local-part-ci text required constant) (use-for-notifications boolean required) (verified integer) (preferred-content-type symbol required))
...or one that has a field that's a property (as defined with `define-property-type`) rather than an attribute:
(define-object-type account 'attrib_account (onboarding integer) (password password))