mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-08-24 05:51:50 +00:00
43 lines
1.1 KiB
Dart
43 lines
1.1 KiB
Dart
class ServerBasicInfo {
|
|
ServerBasicInfo({
|
|
required this.id,
|
|
required this.name,
|
|
required this.reverseDns,
|
|
required this.ip,
|
|
required this.created,
|
|
});
|
|
final int id;
|
|
final String name;
|
|
final String reverseDns;
|
|
final String ip;
|
|
final DateTime created;
|
|
}
|
|
|
|
class ServerBasicInfoWithValidators extends ServerBasicInfo {
|
|
ServerBasicInfoWithValidators.fromServerBasicInfo({
|
|
required final ServerBasicInfo serverBasicInfo,
|
|
required final isIpValid,
|
|
required final isReverseDnsValid,
|
|
}) : this(
|
|
id: serverBasicInfo.id,
|
|
name: serverBasicInfo.name,
|
|
reverseDns: serverBasicInfo.reverseDns,
|
|
ip: serverBasicInfo.ip,
|
|
created: serverBasicInfo.created,
|
|
isIpValid: isIpValid,
|
|
isReverseDnsValid: isReverseDnsValid,
|
|
);
|
|
|
|
ServerBasicInfoWithValidators({
|
|
required super.id,
|
|
required super.name,
|
|
required super.reverseDns,
|
|
required super.ip,
|
|
required super.created,
|
|
required this.isIpValid,
|
|
required this.isReverseDnsValid,
|
|
});
|
|
final bool isIpValid;
|
|
final bool isReverseDnsValid;
|
|
}
|