2020-05-14 17:29:10 +00:00
|
|
|
import 'package:hive/hive.dart';
|
|
|
|
|
|
|
|
part 'exchange_template.g.dart';
|
|
|
|
|
2021-01-15 17:41:30 +00:00
|
|
|
@HiveType(typeId: ExchangeTemplate.typeId)
|
2020-05-14 17:29:10 +00:00
|
|
|
class ExchangeTemplate extends HiveObject {
|
|
|
|
ExchangeTemplate({
|
2022-11-01 21:43:39 +00:00
|
|
|
required this.amountRaw,
|
|
|
|
required this.depositCurrencyRaw,
|
|
|
|
required this.receiveCurrencyRaw,
|
|
|
|
required this.providerRaw,
|
|
|
|
required this.depositAddressRaw,
|
|
|
|
required this.receiveAddressRaw
|
2020-05-14 17:29:10 +00:00
|
|
|
});
|
|
|
|
|
2021-01-15 17:41:30 +00:00
|
|
|
static const typeId = 7;
|
2020-05-14 17:29:10 +00:00
|
|
|
static const boxName = 'ExchangeTemplate';
|
|
|
|
|
|
|
|
@HiveField(0)
|
2022-11-01 21:43:39 +00:00
|
|
|
String? amountRaw;
|
2020-05-14 17:29:10 +00:00
|
|
|
|
|
|
|
@HiveField(1)
|
2022-11-01 21:43:39 +00:00
|
|
|
String? depositCurrencyRaw;
|
2020-05-14 17:29:10 +00:00
|
|
|
|
|
|
|
@HiveField(2)
|
2022-11-01 21:43:39 +00:00
|
|
|
String? receiveCurrencyRaw;
|
2020-05-14 17:29:10 +00:00
|
|
|
|
|
|
|
@HiveField(3)
|
2022-11-01 21:43:39 +00:00
|
|
|
String? providerRaw;
|
2020-05-14 17:29:10 +00:00
|
|
|
|
|
|
|
@HiveField(4)
|
2022-11-01 21:43:39 +00:00
|
|
|
String? depositAddressRaw;
|
2020-05-14 17:29:10 +00:00
|
|
|
|
|
|
|
@HiveField(5)
|
2022-11-01 21:43:39 +00:00
|
|
|
String? receiveAddressRaw;
|
|
|
|
|
|
|
|
String get amount => amountRaw ?? '';
|
|
|
|
|
|
|
|
String get depositCurrency => depositCurrencyRaw ?? '';
|
|
|
|
|
|
|
|
String get receiveCurrency => receiveCurrencyRaw ?? '';
|
|
|
|
|
|
|
|
String get provider => providerRaw ?? '';
|
|
|
|
|
|
|
|
String get depositAddress => depositAddressRaw ?? '';
|
|
|
|
|
|
|
|
String get receiveAddress => receiveAddressRaw ?? '';
|
2020-05-14 17:29:10 +00:00
|
|
|
}
|