EthosRecord class
Canonical ethos record.
Constructors
-
EthosRecord({required String id, required String name, required String version, required Map<
String, dynamic> payload, required DateTime createdAt, bool active = false}) -
const
-
EthosRecord.fromJson(Map<
String, dynamic> json) -
Construct from a JSON map.
payloadis preserved as-is.activedefaults to false when absent.createdAtparses ISO-8601 strings; missing values fall back toDateTime.now()so corrupt records do not crash callers (they surface as records with synthetic recency — adapters should validate before re-persisting).factory
Properties
- active → bool
-
Whether this ethos is currently active.
final
- createdAt → DateTime
-
Creation timestamp.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Ethos identifier.
final
- name → String
-
Human-readable name.
final
-
payload
→ Map<
String, dynamic> -
Opaque ethos payload (rules, principles, priorities).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- version → String
-
Version string.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serialize to JSON.
createdAtround-trips as an ISO-8601 string so adapters usingdart:convertjsonEncodecan persist directly. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited