Some checks failed
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
ci/woodpecker/push/bump_version Pipeline failed
34 lines
698 B
Dart
34 lines
698 B
Dart
import 'package:flutter/foundation.dart';
|
|
|
|
import 'package:pshared/config/web.dart';
|
|
|
|
|
|
abstract class Storable {
|
|
String get id;
|
|
DateTime get createdAt;
|
|
DateTime get updatedAt;
|
|
}
|
|
|
|
@immutable
|
|
class _StorableImp implements Storable {
|
|
@override
|
|
final String id;
|
|
@override
|
|
final DateTime createdAt;
|
|
@override
|
|
final DateTime updatedAt;
|
|
|
|
const _StorableImp({
|
|
required this.id,
|
|
required this.createdAt,
|
|
required this.updatedAt,
|
|
});
|
|
|
|
}
|
|
|
|
Storable newStorable({String? id, DateTime? createdAt, DateTime? updatedAt}) => _StorableImp(
|
|
id: id ?? Constants.nilObjectRef,
|
|
createdAt: createdAt ?? DateTime.now().toUtc(),
|
|
updatedAt: updatedAt ?? DateTime.now().toUtc(),
|
|
);
|