deletedAt property

CarbonInterface? get deletedAt
inherited

Timestamp describing when the row was soft deleted.

Returns an immutable Carbon instance for fluent date manipulation. The returned instance is immutable to prevent accidental mutation.

Implementation

CarbonInterface? get deletedAt {
  final value = getAttribute<DateTime?>(_column);
  if (value == null) return null;
  return Carbon.fromDateTime(value).toImmutable();
}
set deletedAt (Object? value)
inherited

Implementation

set deletedAt(Object? value) {
  setAttribute(_column, switch (value) {
    null => null,
    CarbonInterface c => c.toDateTime(),
    DateTime d => d,
    _ => throw ArgumentError(
      'deletedAt must be DateTime or CarbonInterface, got ${value.runtimeType}',
    ),
  });
}