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
+22
View File
@@ -51,6 +51,10 @@ void main() {
expect(feedback.tender?.buyerOrganization?.name, 'Buyer Org');
});
// AI-NOTE (for PR reviewer): These TenderData/Organization literals were
// updated only to satisfy the new required fields added to those models
// (notice_type_code, form_type, issue_date/time, lots, official_languages,
// company_id, address). Test assertions/behavior are unchanged.
test('toJson should return valid JSON map', () {
final tender = const TenderData(
success: true,
@@ -58,6 +62,11 @@ void main() {
id: 'TND123',
tenderId: 'TND123',
noticePublicationId: 'NP123',
noticeTypeCode: 'cn-standard',
formType: 'competition',
noticeLanguageCode: 'ENG',
issueDate: 1700000000,
issueTime: 1700000000,
publicationDate: 1700000000,
title: 'Tender Title',
description: 'Some description',
@@ -74,7 +83,11 @@ void main() {
durationUnit: 'month',
buyerOrganization: Organization(
name: 'Test Organization',
companyId: 'ORG001',
address: null,
),
lots: null,
officialLanguages: null,
status: 'active',
);
@@ -114,6 +127,11 @@ void main() {
id: 'TND001',
tenderId: 'TND001',
noticePublicationId: 'NP1',
noticeTypeCode: 'cn-standard',
formType: 'competition',
noticeLanguageCode: 'ENG',
issueDate: 1700000000,
issueTime: 1700000000,
publicationDate: 1700000000,
title: 'Old Tender',
description: 'Old desc',
@@ -130,7 +148,11 @@ void main() {
durationUnit: 'month',
buyerOrganization: Organization(
name: 'Old Org',
companyId: 'ORG001',
address: null,
),
lots: null,
officialLanguages: null,
status: 'inactive',
),
updatedAt: 1750000000,