2022-05-20 22:56:50 +00:00
|
|
|
class ServerBasicInfo {
|
|
|
|
ServerBasicInfo({
|
|
|
|
required this.id,
|
|
|
|
required this.name,
|
|
|
|
required this.reverseDns,
|
|
|
|
required this.ip,
|
|
|
|
required this.created,
|
2024-08-14 03:12:47 +00:00
|
|
|
required this.location,
|
2022-05-20 22:56:50 +00:00
|
|
|
});
|
2022-06-05 19:36:32 +00:00
|
|
|
final int id;
|
|
|
|
final String name;
|
|
|
|
final String reverseDns;
|
|
|
|
final String ip;
|
|
|
|
final DateTime created;
|
2024-08-14 03:12:47 +00:00
|
|
|
final String location;
|
2022-05-20 22:56:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class ServerBasicInfoWithValidators extends ServerBasicInfo {
|
|
|
|
ServerBasicInfoWithValidators.fromServerBasicInfo({
|
2022-06-05 19:36:32 +00:00
|
|
|
required final ServerBasicInfo serverBasicInfo,
|
|
|
|
required final isIpValid,
|
|
|
|
required final isReverseDnsValid,
|
2022-05-20 22:56:50 +00:00
|
|
|
}) : this(
|
|
|
|
id: serverBasicInfo.id,
|
|
|
|
name: serverBasicInfo.name,
|
|
|
|
reverseDns: serverBasicInfo.reverseDns,
|
|
|
|
ip: serverBasicInfo.ip,
|
|
|
|
created: serverBasicInfo.created,
|
2024-08-14 03:12:47 +00:00
|
|
|
location: serverBasicInfo.location,
|
2022-05-20 22:56:50 +00:00
|
|
|
isIpValid: isIpValid,
|
|
|
|
isReverseDnsValid: isReverseDnsValid,
|
|
|
|
);
|
2022-06-05 19:36:32 +00:00
|
|
|
|
|
|
|
ServerBasicInfoWithValidators({
|
2022-10-26 16:26:09 +00:00
|
|
|
required super.id,
|
|
|
|
required super.name,
|
|
|
|
required super.reverseDns,
|
|
|
|
required super.ip,
|
|
|
|
required super.created,
|
2024-08-14 03:12:47 +00:00
|
|
|
required super.location,
|
2022-06-05 19:36:32 +00:00
|
|
|
required this.isIpValid,
|
|
|
|
required this.isReverseDnsValid,
|
|
|
|
});
|
|
|
|
final bool isIpValid;
|
|
|
|
final bool isReverseDnsValid;
|
2022-05-20 22:56:50 +00:00
|
|
|
}
|