2021-01-06 17:35:57 +00:00
|
|
|
import 'package:hive/hive.dart';
|
|
|
|
|
2022-05-13 13:57:56 +00:00
|
|
|
part 'server_domain.g.dart';
|
|
|
|
|
2021-01-06 17:35:57 +00:00
|
|
|
@HiveType(typeId: 3)
|
2022-05-13 13:57:56 +00:00
|
|
|
class ServerDomain {
|
|
|
|
ServerDomain({
|
2021-03-26 13:38:39 +00:00
|
|
|
required this.domainName,
|
|
|
|
required this.zoneId,
|
2022-05-13 13:57:56 +00:00
|
|
|
required this.provider,
|
2021-03-26 13:38:39 +00:00
|
|
|
});
|
2021-01-06 17:35:57 +00:00
|
|
|
|
|
|
|
@HiveField(0)
|
2021-03-26 13:38:39 +00:00
|
|
|
final String domainName;
|
2021-01-06 17:35:57 +00:00
|
|
|
|
|
|
|
@HiveField(1)
|
2021-03-26 13:38:39 +00:00
|
|
|
final String zoneId;
|
2021-01-06 17:35:57 +00:00
|
|
|
|
2022-05-24 18:55:39 +00:00
|
|
|
@HiveField(2, defaultValue: DnsProvider.cloudflare)
|
2022-05-13 13:57:56 +00:00
|
|
|
final DnsProvider provider;
|
|
|
|
|
2021-01-06 17:35:57 +00:00
|
|
|
@override
|
2022-06-05 19:36:32 +00:00
|
|
|
String toString() => '$domainName: $zoneId';
|
2021-01-06 17:35:57 +00:00
|
|
|
}
|
2022-05-14 02:54:40 +00:00
|
|
|
|
|
|
|
@HiveType(typeId: 100)
|
|
|
|
enum DnsProvider {
|
|
|
|
@HiveField(0)
|
2022-05-24 18:55:39 +00:00
|
|
|
unknown,
|
2022-05-14 02:54:40 +00:00
|
|
|
@HiveField(1)
|
2022-05-24 18:55:39 +00:00
|
|
|
cloudflare,
|
2023-05-09 06:15:48 +00:00
|
|
|
@HiveField(2)
|
|
|
|
desec
|
2022-05-14 02:54:40 +00:00
|
|
|
}
|