mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-18 02:07:43 +00:00
46 lines
1,009 B
Dart
46 lines
1,009 B
Dart
/*
|
|
* This file is part of Stack Wallet.
|
|
*
|
|
* Copyright (c) 2023 Cypher Stack
|
|
* All Rights Reserved.
|
|
* The code is distributed under GPLv3 license, see LICENSE file for details.
|
|
* Generated by Cypher Stack on 2023-05-26
|
|
*
|
|
*/
|
|
|
|
import 'package:isar/isar.dart';
|
|
|
|
part 'address_label.g.dart';
|
|
|
|
@Collection()
|
|
class AddressLabel {
|
|
AddressLabel({
|
|
required this.walletId,
|
|
required this.addressString,
|
|
required this.value,
|
|
required this.tags,
|
|
});
|
|
|
|
Id id = Isar.autoIncrement;
|
|
|
|
@Index()
|
|
late final String walletId;
|
|
|
|
@Index(unique: true, composite: [CompositeIndex("walletId")])
|
|
late final String addressString;
|
|
|
|
late final String value;
|
|
|
|
late final List<String>? tags;
|
|
|
|
AddressLabel copyWith({String? label, Id? id, List<String>? tags}) {
|
|
final addressLabel = AddressLabel(
|
|
walletId: walletId,
|
|
addressString: addressString,
|
|
value: label ?? value,
|
|
tags: tags ?? this.tags,
|
|
);
|
|
addressLabel.id = id ?? this.id;
|
|
return addressLabel;
|
|
}
|
|
}
|