Contents

AppEntity(_:schema:)

Marks a transient entity that conforms to a schema as one whose values the model can generate on its own.

Declaration

@attached(memberAttribute) @attached(extension, conformances: GenerableEntity, AppEntity, AssistantSchemaEntity, FileEntity, UniqueAppEntity, URLRepresentableEntity, names: named(__appSchemaEntity)) macro AppEntity<T>(_ traits: AppEntityTraits, schema: T) where T : AppSchemaEntity

Parameters

  • traits:

    The entity’s roles, such as .generable or [.generable].

  • schema:

    The schema the entity conforms to.

Overview

Use this macro in place of @AppEntity(schema:). It adds everything @AppEntity(schema:) adds, plus a GenerableEntity conformance.

See Also

Entity support