2023-08-15 00:47:25 +00:00
|
|
|
import 'package:cw_core/hive_type_ids.dart';
|
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 {
|
2023-05-03 07:01:51 +00:00
|
|
|
ExchangeTemplate(
|
|
|
|
{required this.amountRaw,
|
|
|
|
required this.depositCurrencyRaw,
|
|
|
|
required this.receiveCurrencyRaw,
|
|
|
|
required this.providerRaw,
|
|
|
|
required this.depositAddressRaw,
|
|
|
|
required this.receiveAddressRaw,
|
|
|
|
required this.depositCurrencyTitleRaw,
|
|
|
|
required this.receiveCurrencyTitleRaw});
|
2020-05-14 17:29:10 +00:00
|
|
|
|
2023-08-15 00:47:25 +00:00
|
|
|
static const typeId = EXCHANGE_TEMPLATE_TYPE_ID;
|
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;
|
|
|
|
|
2023-05-03 07:01:51 +00:00
|
|
|
@HiveField(6)
|
|
|
|
String? depositCurrencyTitleRaw;
|
|
|
|
|
|
|
|
@HiveField(7)
|
|
|
|
String? receiveCurrencyTitleRaw;
|
|
|
|
|
2022-11-01 21:43:39 +00:00
|
|
|
String get amount => amountRaw ?? '';
|
|
|
|
|
|
|
|
String get depositCurrency => depositCurrencyRaw ?? '';
|
|
|
|
|
|
|
|
String get receiveCurrency => receiveCurrencyRaw ?? '';
|
|
|
|
|
|
|
|
String get provider => providerRaw ?? '';
|
|
|
|
|
|
|
|
String get depositAddress => depositAddressRaw ?? '';
|
|
|
|
|
|
|
|
String get receiveAddress => receiveAddressRaw ?? '';
|
2023-05-03 07:01:51 +00:00
|
|
|
|
|
|
|
String get depositCurrencyTitle => depositCurrencyTitleRaw ?? '';
|
|
|
|
|
|
|
|
String get receiveCurrencyTitle => receiveCurrencyTitleRaw ?? '';
|
|
|
|
}
|