Operation.legacy constructor
Operation.legacy({
- required OperationType type,
- required EntityId entityId,
- String? attribute,
- dynamic value,
- dynamic oldValue,
Implementation
factory Operation.legacy({
required OperationType type,
required EntityId entityId,
String? attribute,
dynamic value,
dynamic oldValue,
}) {
final data = <String, dynamic>{};
if (attribute != null && value != null) {
data[attribute] = value;
}
return Operation(
type: type,
entityType: 'unknown', // Will be set properly by transaction builder
entityId: entityId,
data: data.isEmpty ? null : data,
);
}