86ed7bc665
- Updated the `Lot`, `Organization`, and `OrganizationAddress` models to enhance data mapping for tender details. - Revised the `TenderData` model to include additional fields reflecting the API response structure. - Improved UI components across desktop, mobile, and tablet views by commenting out unused sections for future use. - Added new string constants for lot details in the tender information section. - Enhanced unit tests to cover new model fields and ensure resilience to partial API payloads.
21 lines
627 B
Dart
21 lines
627 B
Dart
// ignore_for_file: invalid_annotation_target
|
|
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'lot.freezed.dart';
|
|
part 'lot.g.dart';
|
|
|
|
// Model for entries in the tender-details `lots` array. Only lot_id, title and
|
|
// description are mapped — the fields the tender-details "Lots" section renders.
|
|
// Add more fields here if the UI grows.
|
|
@freezed
|
|
abstract class Lot with _$Lot {
|
|
const factory Lot({
|
|
@JsonKey(name: 'lot_id') required String? lotId,
|
|
required String? title,
|
|
required String? description,
|
|
}) = _Lot;
|
|
|
|
factory Lot.fromJson(Map<String, Object?> json) => _$LotFromJson(json);
|
|
}
|