2023-10-22 22:15:34 +02:00
|
|
|
import 'package:openapi/api.dart';
|
|
|
|
|
|
|
|
class ServerConfig {
|
|
|
|
final int trashDays;
|
|
|
|
|
|
|
|
const ServerConfig({
|
|
|
|
required this.trashDays,
|
|
|
|
});
|
|
|
|
|
|
|
|
ServerConfig copyWith({
|
|
|
|
int? trashDays,
|
|
|
|
}) {
|
|
|
|
return ServerConfig(
|
|
|
|
trashDays: trashDays ?? this.trashDays,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
String toString() {
|
2023-11-09 18:10:56 +02:00
|
|
|
return 'ServerConfig(trashDays: $trashDays)';
|
2023-10-22 22:15:34 +02:00
|
|
|
}
|
|
|
|
|
2023-11-09 18:10:56 +02:00
|
|
|
ServerConfig.fromDto(ServerConfigDto dto) : trashDays = dto.trashDays;
|
2023-10-22 22:15:34 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
if (identical(this, other)) return true;
|
|
|
|
|
2023-11-09 18:10:56 +02:00
|
|
|
return other is ServerConfig && other.trashDays == trashDays;
|
2023-10-22 22:15:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
int get hashCode {
|
2023-11-09 18:10:56 +02:00
|
|
|
return trashDays.hashCode;
|
2023-10-22 22:15:34 +02:00
|
|
|
}
|
|
|
|
}
|