createOplogEntry method

FutureOr<void> createOplogEntry(
  1. SideEffectModel entity,
  2. DataOperation operation
)
inherited

Implementation

FutureOr<void> createOplogEntry(D entity, DataOperation operation) async {
  final auditDetails = entity.auditDetails;
  if (auditDetails == null) {
    return;
  }
  final entry = OpLogEntry(
    entity,
    operation,
    createdAt: DateTime.now(),
    createdBy: entity.clientAuditDetails?.lastModifiedBy ?? '',
    type: type,
  );

  return opLogManager.put(entry);
}