dde66521f6
- 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.
24 lines
957 B
Dart
24 lines
957 B
Dart
// ignore_for_file: invalid_annotation_target
|
|
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
import 'package:tm_app/data/services/model/organization/organization_address.dart';
|
|
|
|
part 'organization.freezed.dart';
|
|
part 'organization.g.dart';
|
|
|
|
// AI-NOTE (for PR reviewer): Added company_id and a nested address
|
|
// (OrganizationAddress) to surface buyer details on the tender-details page.
|
|
// A dedicated OrganizationAddress type is used instead of the existing
|
|
// `Address` model because the buyer address shape differs (city_name +
|
|
// country_code only) and is unrelated to the user-profile Address.
|
|
@freezed
|
|
abstract class Organization with _$Organization {
|
|
const factory Organization({
|
|
required String? name,
|
|
@JsonKey(name: 'company_id') required String? companyId,
|
|
required OrganizationAddress? address,
|
|
}) = _Organization;
|
|
|
|
factory Organization.fromJson(Map<String, Object?> json) =>
|
|
_$OrganizationFromJson(json);
|
|
} |