| 123456789101112131415161718 |
- import 'package:freezed_annotation/freezed_annotation.dart';
- part 'sync_response_dto.freezed.dart';
- part 'sync_response_dto.g.dart';
- @freezed
- class SyncResponseDto with _$SyncResponseDto {
- const SyncResponseDto._();
- const factory SyncResponseDto({
- @Default(0) int status,
- @Default('OK') String statusText,
- int? idAssegnato,
- @Default([]) List<String> messages,
- @Default([]) List<String> validationErrors,
- }) = _SyncResponseDto;
- factory SyncResponseDto.fromJson(Map<String, dynamic> json) => _$SyncResponseDtoFromJson(json);
- bool get isOk => status == 0;
- }
|