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:
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$Organization {
|
||||
|
||||
String? get name;
|
||||
String? get name;@JsonKey(name: 'company_id') String? get companyId; OrganizationAddress? get address;
|
||||
/// Create a copy of Organization
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $OrganizationCopyWith<Organization> get copyWith => _$OrganizationCopyWithImpl<O
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is Organization&&(identical(other.name, name) || other.name == name));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is Organization&&(identical(other.name, name) || other.name == name)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.address, address) || other.address == address));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,name);
|
||||
int get hashCode => Object.hash(runtimeType,name,companyId,address);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Organization(name: $name)';
|
||||
return 'Organization(name: $name, companyId: $companyId, address: $address)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,11 +48,11 @@ abstract mixin class $OrganizationCopyWith<$Res> {
|
||||
factory $OrganizationCopyWith(Organization value, $Res Function(Organization) _then) = _$OrganizationCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? name
|
||||
String? name,@JsonKey(name: 'company_id') String? companyId, OrganizationAddress? address
|
||||
});
|
||||
|
||||
|
||||
|
||||
$OrganizationAddressCopyWith<$Res>? get address;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
@@ -65,13 +65,27 @@ class _$OrganizationCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of Organization
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? name = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? name = freezed,Object? companyId = freezed,Object? address = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
as String?,companyId: freezed == companyId ? _self.companyId : companyId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
|
||||
as OrganizationAddress?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of Organization
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$OrganizationAddressCopyWith<$Res>? get address {
|
||||
if (_self.address == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $OrganizationAddressCopyWith<$Res>(_self.address!, (value) {
|
||||
return _then(_self.copyWith(address: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -153,10 +167,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? name)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? name, @JsonKey(name: 'company_id') String? companyId, OrganizationAddress? address)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Organization() when $default != null:
|
||||
return $default(_that.name);case _:
|
||||
return $default(_that.name,_that.companyId,_that.address);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -174,10 +188,10 @@ return $default(_that.name);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? name) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? name, @JsonKey(name: 'company_id') String? companyId, OrganizationAddress? address) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Organization():
|
||||
return $default(_that.name);case _:
|
||||
return $default(_that.name,_that.companyId,_that.address);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -194,10 +208,10 @@ return $default(_that.name);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? name)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? name, @JsonKey(name: 'company_id') String? companyId, OrganizationAddress? address)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Organization() when $default != null:
|
||||
return $default(_that.name);case _:
|
||||
return $default(_that.name,_that.companyId,_that.address);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -209,10 +223,12 @@ return $default(_that.name);case _:
|
||||
@JsonSerializable()
|
||||
|
||||
class _Organization implements Organization {
|
||||
const _Organization({required this.name});
|
||||
const _Organization({required this.name, @JsonKey(name: 'company_id') required this.companyId, required this.address});
|
||||
factory _Organization.fromJson(Map<String, dynamic> json) => _$OrganizationFromJson(json);
|
||||
|
||||
@override final String? name;
|
||||
@override@JsonKey(name: 'company_id') final String? companyId;
|
||||
@override final OrganizationAddress? address;
|
||||
|
||||
/// Create a copy of Organization
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -227,16 +243,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Organization&&(identical(other.name, name) || other.name == name));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Organization&&(identical(other.name, name) || other.name == name)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.address, address) || other.address == address));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,name);
|
||||
int get hashCode => Object.hash(runtimeType,name,companyId,address);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Organization(name: $name)';
|
||||
return 'Organization(name: $name, companyId: $companyId, address: $address)';
|
||||
}
|
||||
|
||||
|
||||
@@ -247,11 +263,11 @@ abstract mixin class _$OrganizationCopyWith<$Res> implements $OrganizationCopyWi
|
||||
factory _$OrganizationCopyWith(_Organization value, $Res Function(_Organization) _then) = __$OrganizationCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? name
|
||||
String? name,@JsonKey(name: 'company_id') String? companyId, OrganizationAddress? address
|
||||
});
|
||||
|
||||
|
||||
|
||||
@override $OrganizationAddressCopyWith<$Res>? get address;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
@@ -264,14 +280,28 @@ class __$OrganizationCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of Organization
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? name = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? name = freezed,Object? companyId = freezed,Object? address = freezed,}) {
|
||||
return _then(_Organization(
|
||||
name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
as String?,companyId: freezed == companyId ? _self.companyId : companyId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
|
||||
as OrganizationAddress?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of Organization
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$OrganizationAddressCopyWith<$Res>? get address {
|
||||
if (_self.address == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $OrganizationAddressCopyWith<$Res>(_self.address!, (value) {
|
||||
return _then(_self.copyWith(address: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
||||
Reference in New Issue
Block a user