mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-04 15:49:49 +00:00
25 lines
560 B
Dart
25 lines
560 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'server_config.g.dart';
|
|
|
|
@JsonSerializable()
|
|
class ServerConfig {
|
|
late String host;
|
|
late int port;
|
|
late int connections;
|
|
late String downloadDir;
|
|
Map<String, dynamic>? extra;
|
|
|
|
ServerConfig({
|
|
required this.host,
|
|
required this.port,
|
|
required this.connections,
|
|
required this.downloadDir,
|
|
this.extra,
|
|
});
|
|
|
|
factory ServerConfig.fromJson(Map<String, dynamic> json) =>
|
|
_$ServerConfigFromJson(json);
|
|
Map<String, dynamic> toJson() => _$ServerConfigToJson(this);
|
|
}
|