755 lines
25 KiB
Dart
755 lines
25 KiB
Dart
// coverage:ignore-file
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// ignore_for_file: type=lint
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
|
|
part of 'customer_dtos.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
T _$identity<T>(T value) => value;
|
|
|
|
final _privateConstructorUsedError = UnsupportedError(
|
|
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
|
);
|
|
|
|
ListCustomerDto _$ListCustomerDtoFromJson(Map<String, dynamic> json) {
|
|
return _ListCustomerDto.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$ListCustomerDto {
|
|
@JsonKey(name: "data")
|
|
List<CustomerDto>? get customers => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "total_count")
|
|
int? get totalCount => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "page")
|
|
int? get page => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "limit")
|
|
int? get limit => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "total_pages")
|
|
int? get totalPages => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this ListCustomerDto to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of ListCustomerDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$ListCustomerDtoCopyWith<ListCustomerDto> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $ListCustomerDtoCopyWith<$Res> {
|
|
factory $ListCustomerDtoCopyWith(
|
|
ListCustomerDto value,
|
|
$Res Function(ListCustomerDto) then,
|
|
) = _$ListCustomerDtoCopyWithImpl<$Res, ListCustomerDto>;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "data") List<CustomerDto>? customers,
|
|
@JsonKey(name: "total_count") int? totalCount,
|
|
@JsonKey(name: "page") int? page,
|
|
@JsonKey(name: "limit") int? limit,
|
|
@JsonKey(name: "total_pages") int? totalPages,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$ListCustomerDtoCopyWithImpl<$Res, $Val extends ListCustomerDto>
|
|
implements $ListCustomerDtoCopyWith<$Res> {
|
|
_$ListCustomerDtoCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of ListCustomerDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? customers = freezed,
|
|
Object? totalCount = freezed,
|
|
Object? page = freezed,
|
|
Object? limit = freezed,
|
|
Object? totalPages = freezed,
|
|
}) {
|
|
return _then(
|
|
_value.copyWith(
|
|
customers: freezed == customers
|
|
? _value.customers
|
|
: customers // ignore: cast_nullable_to_non_nullable
|
|
as List<CustomerDto>?,
|
|
totalCount: freezed == totalCount
|
|
? _value.totalCount
|
|
: totalCount // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
page: freezed == page
|
|
? _value.page
|
|
: page // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
limit: freezed == limit
|
|
? _value.limit
|
|
: limit // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
totalPages: freezed == totalPages
|
|
? _value.totalPages
|
|
: totalPages // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
)
|
|
as $Val,
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$ListCustomerDtoImplCopyWith<$Res>
|
|
implements $ListCustomerDtoCopyWith<$Res> {
|
|
factory _$$ListCustomerDtoImplCopyWith(
|
|
_$ListCustomerDtoImpl value,
|
|
$Res Function(_$ListCustomerDtoImpl) then,
|
|
) = __$$ListCustomerDtoImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "data") List<CustomerDto>? customers,
|
|
@JsonKey(name: "total_count") int? totalCount,
|
|
@JsonKey(name: "page") int? page,
|
|
@JsonKey(name: "limit") int? limit,
|
|
@JsonKey(name: "total_pages") int? totalPages,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$ListCustomerDtoImplCopyWithImpl<$Res>
|
|
extends _$ListCustomerDtoCopyWithImpl<$Res, _$ListCustomerDtoImpl>
|
|
implements _$$ListCustomerDtoImplCopyWith<$Res> {
|
|
__$$ListCustomerDtoImplCopyWithImpl(
|
|
_$ListCustomerDtoImpl _value,
|
|
$Res Function(_$ListCustomerDtoImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of ListCustomerDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? customers = freezed,
|
|
Object? totalCount = freezed,
|
|
Object? page = freezed,
|
|
Object? limit = freezed,
|
|
Object? totalPages = freezed,
|
|
}) {
|
|
return _then(
|
|
_$ListCustomerDtoImpl(
|
|
customers: freezed == customers
|
|
? _value._customers
|
|
: customers // ignore: cast_nullable_to_non_nullable
|
|
as List<CustomerDto>?,
|
|
totalCount: freezed == totalCount
|
|
? _value.totalCount
|
|
: totalCount // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
page: freezed == page
|
|
? _value.page
|
|
: page // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
limit: freezed == limit
|
|
? _value.limit
|
|
: limit // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
totalPages: freezed == totalPages
|
|
? _value.totalPages
|
|
: totalPages // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$ListCustomerDtoImpl extends _ListCustomerDto
|
|
with DiagnosticableTreeMixin {
|
|
const _$ListCustomerDtoImpl({
|
|
@JsonKey(name: "data") final List<CustomerDto>? customers,
|
|
@JsonKey(name: "total_count") this.totalCount,
|
|
@JsonKey(name: "page") this.page,
|
|
@JsonKey(name: "limit") this.limit,
|
|
@JsonKey(name: "total_pages") this.totalPages,
|
|
}) : _customers = customers,
|
|
super._();
|
|
|
|
factory _$ListCustomerDtoImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$ListCustomerDtoImplFromJson(json);
|
|
|
|
final List<CustomerDto>? _customers;
|
|
@override
|
|
@JsonKey(name: "data")
|
|
List<CustomerDto>? get customers {
|
|
final value = _customers;
|
|
if (value == null) return null;
|
|
if (_customers is EqualUnmodifiableListView) return _customers;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(value);
|
|
}
|
|
|
|
@override
|
|
@JsonKey(name: "total_count")
|
|
final int? totalCount;
|
|
@override
|
|
@JsonKey(name: "page")
|
|
final int? page;
|
|
@override
|
|
@JsonKey(name: "limit")
|
|
final int? limit;
|
|
@override
|
|
@JsonKey(name: "total_pages")
|
|
final int? totalPages;
|
|
|
|
@override
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
return 'ListCustomerDto(customers: $customers, totalCount: $totalCount, page: $page, limit: $limit, totalPages: $totalPages)';
|
|
}
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
super.debugFillProperties(properties);
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'ListCustomerDto'))
|
|
..add(DiagnosticsProperty('customers', customers))
|
|
..add(DiagnosticsProperty('totalCount', totalCount))
|
|
..add(DiagnosticsProperty('page', page))
|
|
..add(DiagnosticsProperty('limit', limit))
|
|
..add(DiagnosticsProperty('totalPages', totalPages));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$ListCustomerDtoImpl &&
|
|
const DeepCollectionEquality().equals(
|
|
other._customers,
|
|
_customers,
|
|
) &&
|
|
(identical(other.totalCount, totalCount) ||
|
|
other.totalCount == totalCount) &&
|
|
(identical(other.page, page) || other.page == page) &&
|
|
(identical(other.limit, limit) || other.limit == limit) &&
|
|
(identical(other.totalPages, totalPages) ||
|
|
other.totalPages == totalPages));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
const DeepCollectionEquality().hash(_customers),
|
|
totalCount,
|
|
page,
|
|
limit,
|
|
totalPages,
|
|
);
|
|
|
|
/// Create a copy of ListCustomerDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$ListCustomerDtoImplCopyWith<_$ListCustomerDtoImpl> get copyWith =>
|
|
__$$ListCustomerDtoImplCopyWithImpl<_$ListCustomerDtoImpl>(
|
|
this,
|
|
_$identity,
|
|
);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$ListCustomerDtoImplToJson(this);
|
|
}
|
|
}
|
|
|
|
abstract class _ListCustomerDto extends ListCustomerDto {
|
|
const factory _ListCustomerDto({
|
|
@JsonKey(name: "data") final List<CustomerDto>? customers,
|
|
@JsonKey(name: "total_count") final int? totalCount,
|
|
@JsonKey(name: "page") final int? page,
|
|
@JsonKey(name: "limit") final int? limit,
|
|
@JsonKey(name: "total_pages") final int? totalPages,
|
|
}) = _$ListCustomerDtoImpl;
|
|
const _ListCustomerDto._() : super._();
|
|
|
|
factory _ListCustomerDto.fromJson(Map<String, dynamic> json) =
|
|
_$ListCustomerDtoImpl.fromJson;
|
|
|
|
@override
|
|
@JsonKey(name: "data")
|
|
List<CustomerDto>? get customers;
|
|
@override
|
|
@JsonKey(name: "total_count")
|
|
int? get totalCount;
|
|
@override
|
|
@JsonKey(name: "page")
|
|
int? get page;
|
|
@override
|
|
@JsonKey(name: "limit")
|
|
int? get limit;
|
|
@override
|
|
@JsonKey(name: "total_pages")
|
|
int? get totalPages;
|
|
|
|
/// Create a copy of ListCustomerDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$ListCustomerDtoImplCopyWith<_$ListCustomerDtoImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
CustomerDto _$CustomerDtoFromJson(Map<String, dynamic> json) {
|
|
return _CustomerDto.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$CustomerDto {
|
|
@JsonKey(name: "id")
|
|
String? get id => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "organization_id")
|
|
String? get organizationId => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "name")
|
|
String? get name => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "email")
|
|
String? get email => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "phone")
|
|
String? get phone => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "address")
|
|
String? get address => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "is_default")
|
|
bool? get isDefault => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "is_active")
|
|
bool? get isActive => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "metadata")
|
|
Map<String, dynamic>? get metadata => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "created_at")
|
|
String? get createdAt => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "updated_at")
|
|
String? get updatedAt => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this CustomerDto to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of CustomerDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$CustomerDtoCopyWith<CustomerDto> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $CustomerDtoCopyWith<$Res> {
|
|
factory $CustomerDtoCopyWith(
|
|
CustomerDto value,
|
|
$Res Function(CustomerDto) then,
|
|
) = _$CustomerDtoCopyWithImpl<$Res, CustomerDto>;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "id") String? id,
|
|
@JsonKey(name: "organization_id") String? organizationId,
|
|
@JsonKey(name: "name") String? name,
|
|
@JsonKey(name: "email") String? email,
|
|
@JsonKey(name: "phone") String? phone,
|
|
@JsonKey(name: "address") String? address,
|
|
@JsonKey(name: "is_default") bool? isDefault,
|
|
@JsonKey(name: "is_active") bool? isActive,
|
|
@JsonKey(name: "metadata") Map<String, dynamic>? metadata,
|
|
@JsonKey(name: "created_at") String? createdAt,
|
|
@JsonKey(name: "updated_at") String? updatedAt,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$CustomerDtoCopyWithImpl<$Res, $Val extends CustomerDto>
|
|
implements $CustomerDtoCopyWith<$Res> {
|
|
_$CustomerDtoCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of CustomerDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = freezed,
|
|
Object? organizationId = freezed,
|
|
Object? name = freezed,
|
|
Object? email = freezed,
|
|
Object? phone = freezed,
|
|
Object? address = freezed,
|
|
Object? isDefault = freezed,
|
|
Object? isActive = freezed,
|
|
Object? metadata = freezed,
|
|
Object? createdAt = freezed,
|
|
Object? updatedAt = freezed,
|
|
}) {
|
|
return _then(
|
|
_value.copyWith(
|
|
id: freezed == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
organizationId: freezed == organizationId
|
|
? _value.organizationId
|
|
: organizationId // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
name: freezed == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
email: freezed == email
|
|
? _value.email
|
|
: email // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
phone: freezed == phone
|
|
? _value.phone
|
|
: phone // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
address: freezed == address
|
|
? _value.address
|
|
: address // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
isDefault: freezed == isDefault
|
|
? _value.isDefault
|
|
: isDefault // ignore: cast_nullable_to_non_nullable
|
|
as bool?,
|
|
isActive: freezed == isActive
|
|
? _value.isActive
|
|
: isActive // ignore: cast_nullable_to_non_nullable
|
|
as bool?,
|
|
metadata: freezed == metadata
|
|
? _value.metadata
|
|
: metadata // ignore: cast_nullable_to_non_nullable
|
|
as Map<String, dynamic>?,
|
|
createdAt: freezed == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
updatedAt: freezed == updatedAt
|
|
? _value.updatedAt
|
|
: updatedAt // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
)
|
|
as $Val,
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$CustomerDtoImplCopyWith<$Res>
|
|
implements $CustomerDtoCopyWith<$Res> {
|
|
factory _$$CustomerDtoImplCopyWith(
|
|
_$CustomerDtoImpl value,
|
|
$Res Function(_$CustomerDtoImpl) then,
|
|
) = __$$CustomerDtoImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "id") String? id,
|
|
@JsonKey(name: "organization_id") String? organizationId,
|
|
@JsonKey(name: "name") String? name,
|
|
@JsonKey(name: "email") String? email,
|
|
@JsonKey(name: "phone") String? phone,
|
|
@JsonKey(name: "address") String? address,
|
|
@JsonKey(name: "is_default") bool? isDefault,
|
|
@JsonKey(name: "is_active") bool? isActive,
|
|
@JsonKey(name: "metadata") Map<String, dynamic>? metadata,
|
|
@JsonKey(name: "created_at") String? createdAt,
|
|
@JsonKey(name: "updated_at") String? updatedAt,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$CustomerDtoImplCopyWithImpl<$Res>
|
|
extends _$CustomerDtoCopyWithImpl<$Res, _$CustomerDtoImpl>
|
|
implements _$$CustomerDtoImplCopyWith<$Res> {
|
|
__$$CustomerDtoImplCopyWithImpl(
|
|
_$CustomerDtoImpl _value,
|
|
$Res Function(_$CustomerDtoImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of CustomerDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = freezed,
|
|
Object? organizationId = freezed,
|
|
Object? name = freezed,
|
|
Object? email = freezed,
|
|
Object? phone = freezed,
|
|
Object? address = freezed,
|
|
Object? isDefault = freezed,
|
|
Object? isActive = freezed,
|
|
Object? metadata = freezed,
|
|
Object? createdAt = freezed,
|
|
Object? updatedAt = freezed,
|
|
}) {
|
|
return _then(
|
|
_$CustomerDtoImpl(
|
|
id: freezed == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
organizationId: freezed == organizationId
|
|
? _value.organizationId
|
|
: organizationId // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
name: freezed == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
email: freezed == email
|
|
? _value.email
|
|
: email // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
phone: freezed == phone
|
|
? _value.phone
|
|
: phone // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
address: freezed == address
|
|
? _value.address
|
|
: address // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
isDefault: freezed == isDefault
|
|
? _value.isDefault
|
|
: isDefault // ignore: cast_nullable_to_non_nullable
|
|
as bool?,
|
|
isActive: freezed == isActive
|
|
? _value.isActive
|
|
: isActive // ignore: cast_nullable_to_non_nullable
|
|
as bool?,
|
|
metadata: freezed == metadata
|
|
? _value._metadata
|
|
: metadata // ignore: cast_nullable_to_non_nullable
|
|
as Map<String, dynamic>?,
|
|
createdAt: freezed == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
updatedAt: freezed == updatedAt
|
|
? _value.updatedAt
|
|
: updatedAt // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$CustomerDtoImpl extends _CustomerDto with DiagnosticableTreeMixin {
|
|
const _$CustomerDtoImpl({
|
|
@JsonKey(name: "id") this.id,
|
|
@JsonKey(name: "organization_id") this.organizationId,
|
|
@JsonKey(name: "name") this.name,
|
|
@JsonKey(name: "email") this.email,
|
|
@JsonKey(name: "phone") this.phone,
|
|
@JsonKey(name: "address") this.address,
|
|
@JsonKey(name: "is_default") this.isDefault,
|
|
@JsonKey(name: "is_active") this.isActive,
|
|
@JsonKey(name: "metadata") final Map<String, dynamic>? metadata,
|
|
@JsonKey(name: "created_at") this.createdAt,
|
|
@JsonKey(name: "updated_at") this.updatedAt,
|
|
}) : _metadata = metadata,
|
|
super._();
|
|
|
|
factory _$CustomerDtoImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$CustomerDtoImplFromJson(json);
|
|
|
|
@override
|
|
@JsonKey(name: "id")
|
|
final String? id;
|
|
@override
|
|
@JsonKey(name: "organization_id")
|
|
final String? organizationId;
|
|
@override
|
|
@JsonKey(name: "name")
|
|
final String? name;
|
|
@override
|
|
@JsonKey(name: "email")
|
|
final String? email;
|
|
@override
|
|
@JsonKey(name: "phone")
|
|
final String? phone;
|
|
@override
|
|
@JsonKey(name: "address")
|
|
final String? address;
|
|
@override
|
|
@JsonKey(name: "is_default")
|
|
final bool? isDefault;
|
|
@override
|
|
@JsonKey(name: "is_active")
|
|
final bool? isActive;
|
|
final Map<String, dynamic>? _metadata;
|
|
@override
|
|
@JsonKey(name: "metadata")
|
|
Map<String, dynamic>? get metadata {
|
|
final value = _metadata;
|
|
if (value == null) return null;
|
|
if (_metadata is EqualUnmodifiableMapView) return _metadata;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableMapView(value);
|
|
}
|
|
|
|
@override
|
|
@JsonKey(name: "created_at")
|
|
final String? createdAt;
|
|
@override
|
|
@JsonKey(name: "updated_at")
|
|
final String? updatedAt;
|
|
|
|
@override
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
return 'CustomerDto(id: $id, organizationId: $organizationId, name: $name, email: $email, phone: $phone, address: $address, isDefault: $isDefault, isActive: $isActive, metadata: $metadata, createdAt: $createdAt, updatedAt: $updatedAt)';
|
|
}
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
super.debugFillProperties(properties);
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'CustomerDto'))
|
|
..add(DiagnosticsProperty('id', id))
|
|
..add(DiagnosticsProperty('organizationId', organizationId))
|
|
..add(DiagnosticsProperty('name', name))
|
|
..add(DiagnosticsProperty('email', email))
|
|
..add(DiagnosticsProperty('phone', phone))
|
|
..add(DiagnosticsProperty('address', address))
|
|
..add(DiagnosticsProperty('isDefault', isDefault))
|
|
..add(DiagnosticsProperty('isActive', isActive))
|
|
..add(DiagnosticsProperty('metadata', metadata))
|
|
..add(DiagnosticsProperty('createdAt', createdAt))
|
|
..add(DiagnosticsProperty('updatedAt', updatedAt));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$CustomerDtoImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.organizationId, organizationId) ||
|
|
other.organizationId == organizationId) &&
|
|
(identical(other.name, name) || other.name == name) &&
|
|
(identical(other.email, email) || other.email == email) &&
|
|
(identical(other.phone, phone) || other.phone == phone) &&
|
|
(identical(other.address, address) || other.address == address) &&
|
|
(identical(other.isDefault, isDefault) ||
|
|
other.isDefault == isDefault) &&
|
|
(identical(other.isActive, isActive) ||
|
|
other.isActive == isActive) &&
|
|
const DeepCollectionEquality().equals(other._metadata, _metadata) &&
|
|
(identical(other.createdAt, createdAt) ||
|
|
other.createdAt == createdAt) &&
|
|
(identical(other.updatedAt, updatedAt) ||
|
|
other.updatedAt == updatedAt));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
id,
|
|
organizationId,
|
|
name,
|
|
email,
|
|
phone,
|
|
address,
|
|
isDefault,
|
|
isActive,
|
|
const DeepCollectionEquality().hash(_metadata),
|
|
createdAt,
|
|
updatedAt,
|
|
);
|
|
|
|
/// Create a copy of CustomerDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$CustomerDtoImplCopyWith<_$CustomerDtoImpl> get copyWith =>
|
|
__$$CustomerDtoImplCopyWithImpl<_$CustomerDtoImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$CustomerDtoImplToJson(this);
|
|
}
|
|
}
|
|
|
|
abstract class _CustomerDto extends CustomerDto {
|
|
const factory _CustomerDto({
|
|
@JsonKey(name: "id") final String? id,
|
|
@JsonKey(name: "organization_id") final String? organizationId,
|
|
@JsonKey(name: "name") final String? name,
|
|
@JsonKey(name: "email") final String? email,
|
|
@JsonKey(name: "phone") final String? phone,
|
|
@JsonKey(name: "address") final String? address,
|
|
@JsonKey(name: "is_default") final bool? isDefault,
|
|
@JsonKey(name: "is_active") final bool? isActive,
|
|
@JsonKey(name: "metadata") final Map<String, dynamic>? metadata,
|
|
@JsonKey(name: "created_at") final String? createdAt,
|
|
@JsonKey(name: "updated_at") final String? updatedAt,
|
|
}) = _$CustomerDtoImpl;
|
|
const _CustomerDto._() : super._();
|
|
|
|
factory _CustomerDto.fromJson(Map<String, dynamic> json) =
|
|
_$CustomerDtoImpl.fromJson;
|
|
|
|
@override
|
|
@JsonKey(name: "id")
|
|
String? get id;
|
|
@override
|
|
@JsonKey(name: "organization_id")
|
|
String? get organizationId;
|
|
@override
|
|
@JsonKey(name: "name")
|
|
String? get name;
|
|
@override
|
|
@JsonKey(name: "email")
|
|
String? get email;
|
|
@override
|
|
@JsonKey(name: "phone")
|
|
String? get phone;
|
|
@override
|
|
@JsonKey(name: "address")
|
|
String? get address;
|
|
@override
|
|
@JsonKey(name: "is_default")
|
|
bool? get isDefault;
|
|
@override
|
|
@JsonKey(name: "is_active")
|
|
bool? get isActive;
|
|
@override
|
|
@JsonKey(name: "metadata")
|
|
Map<String, dynamic>? get metadata;
|
|
@override
|
|
@JsonKey(name: "created_at")
|
|
String? get createdAt;
|
|
@override
|
|
@JsonKey(name: "updated_at")
|
|
String? get updatedAt;
|
|
|
|
/// Create a copy of CustomerDto
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$CustomerDtoImplCopyWith<_$CustomerDtoImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|