Add Docker support and enhance data models for tender details

- Introduced a .dockerignore file to optimize Docker builds by excluding unnecessary files.
- Updated the Dockerfile to use a Flutter base image, enabling web builds for the application.
- Added new data models for `Lot` and `OrganizationAddress` to represent tender details more accurately.
- Enhanced the `Organization` model to include `companyId` and a nested `address` field.
- Updated the `TenderData` model to include new fields such as `noticeTypeCode`, `formType`, and `lots`, reflecting the API response structure.
- Regenerated necessary code for data models to ensure compatibility with the updated structures.
This commit is contained in:
AmirReza Jamali
2026-06-03 13:32:42 +03:30
parent 83b77c05ef
commit dde66521f6
35 changed files with 1362 additions and 659 deletions
@@ -2,11 +2,19 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:tm_app/core/utils/date_utils.dart';
import 'package:tm_app/data/services/model/lot/lot.dart';
import 'package:tm_app/data/services/model/organization/organization.dart';
part 'tender_data.freezed.dart';
part 'tender_data.g.dart';
// AI-NOTE (for PR reviewer): New fields were added to mirror the
// /tenders/details/:id response so the tender-details page can show them:
// notice_type_code, form_type, notice_language_code, issue_date, issue_time,
// lots, official_languages. issue_date/issue_time reuse unixTimestampFromJson
// (epoch seconds, tolerant of ms/string) like the other timestamp fields. All
// fields are nullable to stay resilient to partial API payloads. Freezed/json
// codegen (.freezed.dart/.g.dart) was regenerated for these.
@freezed
abstract class TenderData with _$TenderData {
const factory TenderData({
@@ -16,6 +24,13 @@ abstract class TenderData with _$TenderData {
@JsonKey(name: 'tender_id') required String? tenderId,
@JsonKey(name: 'notice_publication_id')
required String? noticePublicationId,
@JsonKey(name: 'notice_type_code') required String? noticeTypeCode,
@JsonKey(name: 'form_type') required String? formType,
@JsonKey(name: 'notice_language_code') required String? noticeLanguageCode,
@JsonKey(name: 'issue_date', fromJson: unixTimestampFromJson)
required int? issueDate,
@JsonKey(name: 'issue_time', fromJson: unixTimestampFromJson)
required int? issueTime,
@JsonKey(name: 'publication_date', fromJson: unixTimestampFromJson)
required int? publicationDate,
required String? title,
@@ -37,6 +52,9 @@ abstract class TenderData with _$TenderData {
@JsonKey(name: 'duration_unit') required String? durationUnit,
@JsonKey(name: 'buyer_organization')
required Organization? buyerOrganization,
required List<Lot>? lots,
@JsonKey(name: 'official_languages')
required List<String>? officialLanguages,
required String? status,
}) = _TenderData;