19 lines
647 B
Dart
19 lines
647 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|||
|
|
|
||
|
|
part 'service_scan_info.freezed.dart';
|
||
|
|
part 'service_scan_info.g.dart';
|
||
|
|
|
||
|
|
/// Mirrors `models.ServiceScanInfo` — one entry in a [ScanResult]'s
|
||
|
|
/// `created`/`updated` lists.
|
||
|
|
@freezed
|
||
|
|
sealed class ServiceScanInfo with _$ServiceScanInfo {
|
||
|
|
const factory ServiceScanInfo({
|
||
|
|
required String name,
|
||
|
|
@JsonKey(name: 'compose_file') required String composeFile,
|
||
|
|
@JsonKey(name: 'backup_folder') String? backupFolder,
|
||
|
|
@Default('unknown') String status,
|
||
|
|
}) = _ServiceScanInfo;
|
||
|
|
|
||
|
|
factory ServiceScanInfo.fromJson(Map<String, dynamic> json) => _$ServiceScanInfoFromJson(json);
|
||
|
|
}
|