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
54 lines
1.5 KiB
Dart
54 lines
1.5 KiB
Dart
import 'package:pshared/models/describable.dart';
|
|
import 'package:pshared/models/permissions/bound.dart';
|
|
import 'package:pshared/models/permissions/bound/describable.dart';
|
|
import 'package:pshared/models/storable.dart';
|
|
|
|
|
|
class Organization implements PermissionBoundStorableDescribable {
|
|
final Storable storable;
|
|
final PermissionBound permissionBound;
|
|
final Describable describable;
|
|
|
|
@override
|
|
String get id => storable.id;
|
|
@override
|
|
DateTime get createdAt => storable.createdAt;
|
|
@override
|
|
DateTime get updatedAt => storable.updatedAt;
|
|
@override
|
|
String get organizationRef => permissionBound.organizationRef;
|
|
@override
|
|
String get permissionRef => permissionBound.permissionRef;
|
|
@override
|
|
String get name => describable.name;
|
|
@override
|
|
String? get description => describable.description;
|
|
|
|
final String timeZone;
|
|
final String? logoUrl;
|
|
final String tenantRef;
|
|
|
|
const Organization({
|
|
required this.storable,
|
|
required this.describable,
|
|
required this.timeZone,
|
|
required this.permissionBound,
|
|
required this.tenantRef,
|
|
this.logoUrl,
|
|
});
|
|
|
|
|
|
Organization copyWith({
|
|
Describable? describable,
|
|
String? timeZone,
|
|
String? Function()? logoUrl,
|
|
}) => Organization(
|
|
storable: storable, // Same Storable, same id
|
|
describable: describableCopyWithOther(this.describable, describable),
|
|
timeZone: timeZone ?? this.timeZone,
|
|
logoUrl: logoUrl != null ? logoUrl() : this.logoUrl,
|
|
permissionBound: permissionBound,
|
|
tenantRef: tenantRef,
|
|
);
|
|
}
|