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, bool autoId = false, ZorphyKind kind = ZorphyKind.entity, String? typeKey, String? subtypeWireValue, List<String> staticMembers = const []})
const

Properties

autoId → bool
Whether the entity owns an auto-generated uuid id field. When true the generated template declares String get id;, adds autoId: true to the annotation and imports package:uuid/uuid.dart.
final
className → String
no setter
defaultOutputDir → String
no setter
dryRun → bool
final
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.
final
name → String
final
outputDir → String?
final
packageName → String?
final
prefixNested → bool
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 fromJson and toJson. When null, defaults to '__typename'. Only meaningful on the base class.
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, bool? autoId, ZorphyKind? kind, 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