EntityConfig class
Configuration for entity creation
Constructors
-
EntityConfig({required String name, String? outputDir, String? packageName, List<
FieldDefinition> fields = const [], bool generateJson = true, bool generateCopyWithFn = false, bool generateCompareTo = true, bool isSealed = false, bool isNonSealed = false, bool generateFilter = false, String? extendsInterface, List<String> explicitSubtypes = const [], bool generateSubtypes = false, bool dryRun = false, bool prefixNested = true, ZorphyKind kind = ZorphyKind.entity, ZorphyArchetype? archetype, String principalKey = 'id', bool? replaySafe, List<UnionVariantDefinition> variants = const [], String? typeKey, String? subtypeWireValue, List<String> staticMembers = const []}) -
const
Properties
- archetype → ZorphyArchetype?
-
The explicit v3 archetype. When null, the legacy kind/isSealed
inputs are lowered for source compatibility.
final
- className → String
-
no setter
- defaultOutputDir → String
-
no setter
- dryRun → bool
-
final
- effectiveArchetype → ZorphyArchetype
-
no setter
-
explicitSubtypes
→ List<
String> -
final
- extendsInterface → String?
-
final
-
fields
→ List<
FieldDefinition> -
final
- generateCompareTo → bool
-
final
- generateCopyWithFn → bool
-
final
- generateFilter → bool
-
final
- generateJson → bool
-
final
- generateSubtypes → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isNonSealed → bool
-
final
- isSealed → bool
-
final
- kind → ZorphyKind
-
The semantic kind of this class — ZorphyKind.entity (default) or
ZorphyKind.valueObject. Retained for source compatibility; new callers
should set archetype.
final
- name → String
-
final
- outputDir → String?
-
final
- packageName → String?
-
final
- prefixNested → bool
-
final
- principalKey → String
-
Principal-key field for an entity archetype (defaults to
id).final - replaySafe → bool?
-
Required replay-safety decision for an intent archetype.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- snakeName → String
-
no setter
-
staticMembers
→ List<
String> -
Static class members in "name:type:value" format.
Emitted as
static final TYPE NAME = VALUE;in the generated class.final - subtypeWireValue → String?
-
Custom wire value for this subtype in the base class's polymorphic
JSON dispatch. When null, the clean class name is used.
Only meaningful on subtype classes.
final
- typeKey → String?
-
Custom JSON key used for polymorphic type dispatch in
fromJsonandtoJson. When null, defaults to'__typename'. Only meaningful on the base class.final -
variants
→ List<
UnionVariantDefinition> -
Inline variants emitted for a union archetype.
final
Methods
-
copyWith(
{String? name, String? outputDir, String? packageName, List< FieldDefinition> ? fields, bool? generateJson, bool? generateCopyWithFn, bool? generateCompareTo, bool? isSealed, bool? isNonSealed, bool? generateFilter, String? extendsInterface, List<String> ? explicitSubtypes, bool? generateSubtypes, bool? dryRun, bool? prefixNested, ZorphyKind? kind, ZorphyArchetype? archetype, String? principalKey, bool? replaySafe, List<UnionVariantDefinition> ? variants, String? typeKey, String? subtypeWireValue, List<String> ? staticMembers}) → EntityConfig -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited