-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathcontact.dart
53 lines (42 loc) · 1.08 KB
/
contact.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/// SPDX-License-Identifier: AGPL-3.0-or-later
import 'package:aewallet/infrastructure/datasources/appdb.hive.dart';
import 'package:aewallet/model/data/account_balance.dart';
import 'package:hive/hive.dart';
part 'contact.g.dart';
enum ContactType { keychainService, externalContact }
/// Next field available : 9
@HiveType(typeId: HiveTypeIds.contact)
@AccountBalanceConverter()
class Contact extends HiveObject {
@Deprecated('Thanks to hive, we should keep this unused class...')
Contact({
required this.name,
required this.address,
required this.type,
required this.publicKey,
required this.genesisAddress,
this.balance,
this.favorite,
});
/// Name
@HiveField(0)
String name;
/// Address
@HiveField(1)
String address;
/// Type contact - Keychain Service / External contact
@HiveField(4)
String type;
/// Public Key
@HiveField(5, defaultValue: '')
String publicKey;
/// Favorite
@HiveField(6)
bool? favorite;
/// Balance
@HiveField(7)
AccountBalance? balance;
/// Genesis Address
@HiveField(8)
String? genesisAddress;
}