feat: payment method analytic repo
This commit is contained in:
@@ -7280,3 +7280,945 @@ abstract class _ProductAnalyticDataDto extends ProductAnalyticDataDto {
|
||||
_$$ProductAnalyticDataDtoImplCopyWith<_$ProductAnalyticDataDtoImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
PaymentMethodAnalyticDto _$PaymentMethodAnalyticDtoFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) {
|
||||
return _PaymentMethodAnalyticDto.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$PaymentMethodAnalyticDto {
|
||||
@JsonKey(name: 'organization_id')
|
||||
String? get organizationId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'outlet_id')
|
||||
String? get outletId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'date_from')
|
||||
String? get dateFrom => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'date_to')
|
||||
String? get dateTo => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'group_by')
|
||||
String? get groupBy => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'summary')
|
||||
PaymentMethodSummaryDto? get summary => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'data')
|
||||
List<PaymentMethodItemDto>? get data => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this PaymentMethodAnalyticDto to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of PaymentMethodAnalyticDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$PaymentMethodAnalyticDtoCopyWith<PaymentMethodAnalyticDto> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PaymentMethodAnalyticDtoCopyWith<$Res> {
|
||||
factory $PaymentMethodAnalyticDtoCopyWith(
|
||||
PaymentMethodAnalyticDto value,
|
||||
$Res Function(PaymentMethodAnalyticDto) then,
|
||||
) = _$PaymentMethodAnalyticDtoCopyWithImpl<$Res, PaymentMethodAnalyticDto>;
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: 'organization_id') String? organizationId,
|
||||
@JsonKey(name: 'outlet_id') String? outletId,
|
||||
@JsonKey(name: 'date_from') String? dateFrom,
|
||||
@JsonKey(name: 'date_to') String? dateTo,
|
||||
@JsonKey(name: 'group_by') String? groupBy,
|
||||
@JsonKey(name: 'summary') PaymentMethodSummaryDto? summary,
|
||||
@JsonKey(name: 'data') List<PaymentMethodItemDto>? data,
|
||||
});
|
||||
|
||||
$PaymentMethodSummaryDtoCopyWith<$Res>? get summary;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PaymentMethodAnalyticDtoCopyWithImpl<
|
||||
$Res,
|
||||
$Val extends PaymentMethodAnalyticDto
|
||||
>
|
||||
implements $PaymentMethodAnalyticDtoCopyWith<$Res> {
|
||||
_$PaymentMethodAnalyticDtoCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of PaymentMethodAnalyticDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? organizationId = freezed,
|
||||
Object? outletId = freezed,
|
||||
Object? dateFrom = freezed,
|
||||
Object? dateTo = freezed,
|
||||
Object? groupBy = freezed,
|
||||
Object? summary = freezed,
|
||||
Object? data = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
organizationId: freezed == organizationId
|
||||
? _value.organizationId
|
||||
: organizationId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
outletId: freezed == outletId
|
||||
? _value.outletId
|
||||
: outletId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
dateFrom: freezed == dateFrom
|
||||
? _value.dateFrom
|
||||
: dateFrom // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
dateTo: freezed == dateTo
|
||||
? _value.dateTo
|
||||
: dateTo // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
groupBy: freezed == groupBy
|
||||
? _value.groupBy
|
||||
: groupBy // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
summary: freezed == summary
|
||||
? _value.summary
|
||||
: summary // ignore: cast_nullable_to_non_nullable
|
||||
as PaymentMethodSummaryDto?,
|
||||
data: freezed == data
|
||||
? _value.data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as List<PaymentMethodItemDto>?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of PaymentMethodAnalyticDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$PaymentMethodSummaryDtoCopyWith<$Res>? get summary {
|
||||
if (_value.summary == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $PaymentMethodSummaryDtoCopyWith<$Res>(_value.summary!, (value) {
|
||||
return _then(_value.copyWith(summary: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PaymentMethodAnalyticDtoImplCopyWith<$Res>
|
||||
implements $PaymentMethodAnalyticDtoCopyWith<$Res> {
|
||||
factory _$$PaymentMethodAnalyticDtoImplCopyWith(
|
||||
_$PaymentMethodAnalyticDtoImpl value,
|
||||
$Res Function(_$PaymentMethodAnalyticDtoImpl) then,
|
||||
) = __$$PaymentMethodAnalyticDtoImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: 'organization_id') String? organizationId,
|
||||
@JsonKey(name: 'outlet_id') String? outletId,
|
||||
@JsonKey(name: 'date_from') String? dateFrom,
|
||||
@JsonKey(name: 'date_to') String? dateTo,
|
||||
@JsonKey(name: 'group_by') String? groupBy,
|
||||
@JsonKey(name: 'summary') PaymentMethodSummaryDto? summary,
|
||||
@JsonKey(name: 'data') List<PaymentMethodItemDto>? data,
|
||||
});
|
||||
|
||||
@override
|
||||
$PaymentMethodSummaryDtoCopyWith<$Res>? get summary;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PaymentMethodAnalyticDtoImplCopyWithImpl<$Res>
|
||||
extends
|
||||
_$PaymentMethodAnalyticDtoCopyWithImpl<
|
||||
$Res,
|
||||
_$PaymentMethodAnalyticDtoImpl
|
||||
>
|
||||
implements _$$PaymentMethodAnalyticDtoImplCopyWith<$Res> {
|
||||
__$$PaymentMethodAnalyticDtoImplCopyWithImpl(
|
||||
_$PaymentMethodAnalyticDtoImpl _value,
|
||||
$Res Function(_$PaymentMethodAnalyticDtoImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of PaymentMethodAnalyticDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? organizationId = freezed,
|
||||
Object? outletId = freezed,
|
||||
Object? dateFrom = freezed,
|
||||
Object? dateTo = freezed,
|
||||
Object? groupBy = freezed,
|
||||
Object? summary = freezed,
|
||||
Object? data = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_$PaymentMethodAnalyticDtoImpl(
|
||||
organizationId: freezed == organizationId
|
||||
? _value.organizationId
|
||||
: organizationId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
outletId: freezed == outletId
|
||||
? _value.outletId
|
||||
: outletId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
dateFrom: freezed == dateFrom
|
||||
? _value.dateFrom
|
||||
: dateFrom // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
dateTo: freezed == dateTo
|
||||
? _value.dateTo
|
||||
: dateTo // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
groupBy: freezed == groupBy
|
||||
? _value.groupBy
|
||||
: groupBy // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
summary: freezed == summary
|
||||
? _value.summary
|
||||
: summary // ignore: cast_nullable_to_non_nullable
|
||||
as PaymentMethodSummaryDto?,
|
||||
data: freezed == data
|
||||
? _value._data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as List<PaymentMethodItemDto>?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$PaymentMethodAnalyticDtoImpl extends _PaymentMethodAnalyticDto {
|
||||
const _$PaymentMethodAnalyticDtoImpl({
|
||||
@JsonKey(name: 'organization_id') this.organizationId,
|
||||
@JsonKey(name: 'outlet_id') this.outletId,
|
||||
@JsonKey(name: 'date_from') this.dateFrom,
|
||||
@JsonKey(name: 'date_to') this.dateTo,
|
||||
@JsonKey(name: 'group_by') this.groupBy,
|
||||
@JsonKey(name: 'summary') this.summary,
|
||||
@JsonKey(name: 'data') final List<PaymentMethodItemDto>? data,
|
||||
}) : _data = data,
|
||||
super._();
|
||||
|
||||
factory _$PaymentMethodAnalyticDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PaymentMethodAnalyticDtoImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'organization_id')
|
||||
final String? organizationId;
|
||||
@override
|
||||
@JsonKey(name: 'outlet_id')
|
||||
final String? outletId;
|
||||
@override
|
||||
@JsonKey(name: 'date_from')
|
||||
final String? dateFrom;
|
||||
@override
|
||||
@JsonKey(name: 'date_to')
|
||||
final String? dateTo;
|
||||
@override
|
||||
@JsonKey(name: 'group_by')
|
||||
final String? groupBy;
|
||||
@override
|
||||
@JsonKey(name: 'summary')
|
||||
final PaymentMethodSummaryDto? summary;
|
||||
final List<PaymentMethodItemDto>? _data;
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<PaymentMethodItemDto>? get data {
|
||||
final value = _data;
|
||||
if (value == null) return null;
|
||||
if (_data is EqualUnmodifiableListView) return _data;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PaymentMethodAnalyticDto(organizationId: $organizationId, outletId: $outletId, dateFrom: $dateFrom, dateTo: $dateTo, groupBy: $groupBy, summary: $summary, data: $data)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$PaymentMethodAnalyticDtoImpl &&
|
||||
(identical(other.organizationId, organizationId) ||
|
||||
other.organizationId == organizationId) &&
|
||||
(identical(other.outletId, outletId) ||
|
||||
other.outletId == outletId) &&
|
||||
(identical(other.dateFrom, dateFrom) ||
|
||||
other.dateFrom == dateFrom) &&
|
||||
(identical(other.dateTo, dateTo) || other.dateTo == dateTo) &&
|
||||
(identical(other.groupBy, groupBy) || other.groupBy == groupBy) &&
|
||||
(identical(other.summary, summary) || other.summary == summary) &&
|
||||
const DeepCollectionEquality().equals(other._data, _data));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
organizationId,
|
||||
outletId,
|
||||
dateFrom,
|
||||
dateTo,
|
||||
groupBy,
|
||||
summary,
|
||||
const DeepCollectionEquality().hash(_data),
|
||||
);
|
||||
|
||||
/// Create a copy of PaymentMethodAnalyticDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PaymentMethodAnalyticDtoImplCopyWith<_$PaymentMethodAnalyticDtoImpl>
|
||||
get copyWith =>
|
||||
__$$PaymentMethodAnalyticDtoImplCopyWithImpl<
|
||||
_$PaymentMethodAnalyticDtoImpl
|
||||
>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$PaymentMethodAnalyticDtoImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _PaymentMethodAnalyticDto extends PaymentMethodAnalyticDto {
|
||||
const factory _PaymentMethodAnalyticDto({
|
||||
@JsonKey(name: 'organization_id') final String? organizationId,
|
||||
@JsonKey(name: 'outlet_id') final String? outletId,
|
||||
@JsonKey(name: 'date_from') final String? dateFrom,
|
||||
@JsonKey(name: 'date_to') final String? dateTo,
|
||||
@JsonKey(name: 'group_by') final String? groupBy,
|
||||
@JsonKey(name: 'summary') final PaymentMethodSummaryDto? summary,
|
||||
@JsonKey(name: 'data') final List<PaymentMethodItemDto>? data,
|
||||
}) = _$PaymentMethodAnalyticDtoImpl;
|
||||
const _PaymentMethodAnalyticDto._() : super._();
|
||||
|
||||
factory _PaymentMethodAnalyticDto.fromJson(Map<String, dynamic> json) =
|
||||
_$PaymentMethodAnalyticDtoImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'organization_id')
|
||||
String? get organizationId;
|
||||
@override
|
||||
@JsonKey(name: 'outlet_id')
|
||||
String? get outletId;
|
||||
@override
|
||||
@JsonKey(name: 'date_from')
|
||||
String? get dateFrom;
|
||||
@override
|
||||
@JsonKey(name: 'date_to')
|
||||
String? get dateTo;
|
||||
@override
|
||||
@JsonKey(name: 'group_by')
|
||||
String? get groupBy;
|
||||
@override
|
||||
@JsonKey(name: 'summary')
|
||||
PaymentMethodSummaryDto? get summary;
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<PaymentMethodItemDto>? get data;
|
||||
|
||||
/// Create a copy of PaymentMethodAnalyticDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PaymentMethodAnalyticDtoImplCopyWith<_$PaymentMethodAnalyticDtoImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
PaymentMethodItemDto _$PaymentMethodItemDtoFromJson(Map<String, dynamic> json) {
|
||||
return _PaymentMethodItemDto.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$PaymentMethodItemDto {
|
||||
@JsonKey(name: 'payment_method_id')
|
||||
String? get paymentMethodId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'payment_method_name')
|
||||
String? get paymentMethodName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'payment_method_type')
|
||||
String? get paymentMethodType => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_amount')
|
||||
num? get totalAmount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'order_count')
|
||||
int? get orderCount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'payment_count')
|
||||
int? get paymentCount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'percentage')
|
||||
double? get percentage => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this PaymentMethodItemDto to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of PaymentMethodItemDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$PaymentMethodItemDtoCopyWith<PaymentMethodItemDto> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PaymentMethodItemDtoCopyWith<$Res> {
|
||||
factory $PaymentMethodItemDtoCopyWith(
|
||||
PaymentMethodItemDto value,
|
||||
$Res Function(PaymentMethodItemDto) then,
|
||||
) = _$PaymentMethodItemDtoCopyWithImpl<$Res, PaymentMethodItemDto>;
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: 'payment_method_id') String? paymentMethodId,
|
||||
@JsonKey(name: 'payment_method_name') String? paymentMethodName,
|
||||
@JsonKey(name: 'payment_method_type') String? paymentMethodType,
|
||||
@JsonKey(name: 'total_amount') num? totalAmount,
|
||||
@JsonKey(name: 'order_count') int? orderCount,
|
||||
@JsonKey(name: 'payment_count') int? paymentCount,
|
||||
@JsonKey(name: 'percentage') double? percentage,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PaymentMethodItemDtoCopyWithImpl<
|
||||
$Res,
|
||||
$Val extends PaymentMethodItemDto
|
||||
>
|
||||
implements $PaymentMethodItemDtoCopyWith<$Res> {
|
||||
_$PaymentMethodItemDtoCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of PaymentMethodItemDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? paymentMethodId = freezed,
|
||||
Object? paymentMethodName = freezed,
|
||||
Object? paymentMethodType = freezed,
|
||||
Object? totalAmount = freezed,
|
||||
Object? orderCount = freezed,
|
||||
Object? paymentCount = freezed,
|
||||
Object? percentage = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
paymentMethodId: freezed == paymentMethodId
|
||||
? _value.paymentMethodId
|
||||
: paymentMethodId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
paymentMethodName: freezed == paymentMethodName
|
||||
? _value.paymentMethodName
|
||||
: paymentMethodName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
paymentMethodType: freezed == paymentMethodType
|
||||
? _value.paymentMethodType
|
||||
: paymentMethodType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
totalAmount: freezed == totalAmount
|
||||
? _value.totalAmount
|
||||
: totalAmount // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
orderCount: freezed == orderCount
|
||||
? _value.orderCount
|
||||
: orderCount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
paymentCount: freezed == paymentCount
|
||||
? _value.paymentCount
|
||||
: paymentCount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
percentage: freezed == percentage
|
||||
? _value.percentage
|
||||
: percentage // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PaymentMethodItemDtoImplCopyWith<$Res>
|
||||
implements $PaymentMethodItemDtoCopyWith<$Res> {
|
||||
factory _$$PaymentMethodItemDtoImplCopyWith(
|
||||
_$PaymentMethodItemDtoImpl value,
|
||||
$Res Function(_$PaymentMethodItemDtoImpl) then,
|
||||
) = __$$PaymentMethodItemDtoImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: 'payment_method_id') String? paymentMethodId,
|
||||
@JsonKey(name: 'payment_method_name') String? paymentMethodName,
|
||||
@JsonKey(name: 'payment_method_type') String? paymentMethodType,
|
||||
@JsonKey(name: 'total_amount') num? totalAmount,
|
||||
@JsonKey(name: 'order_count') int? orderCount,
|
||||
@JsonKey(name: 'payment_count') int? paymentCount,
|
||||
@JsonKey(name: 'percentage') double? percentage,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PaymentMethodItemDtoImplCopyWithImpl<$Res>
|
||||
extends _$PaymentMethodItemDtoCopyWithImpl<$Res, _$PaymentMethodItemDtoImpl>
|
||||
implements _$$PaymentMethodItemDtoImplCopyWith<$Res> {
|
||||
__$$PaymentMethodItemDtoImplCopyWithImpl(
|
||||
_$PaymentMethodItemDtoImpl _value,
|
||||
$Res Function(_$PaymentMethodItemDtoImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of PaymentMethodItemDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? paymentMethodId = freezed,
|
||||
Object? paymentMethodName = freezed,
|
||||
Object? paymentMethodType = freezed,
|
||||
Object? totalAmount = freezed,
|
||||
Object? orderCount = freezed,
|
||||
Object? paymentCount = freezed,
|
||||
Object? percentage = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_$PaymentMethodItemDtoImpl(
|
||||
paymentMethodId: freezed == paymentMethodId
|
||||
? _value.paymentMethodId
|
||||
: paymentMethodId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
paymentMethodName: freezed == paymentMethodName
|
||||
? _value.paymentMethodName
|
||||
: paymentMethodName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
paymentMethodType: freezed == paymentMethodType
|
||||
? _value.paymentMethodType
|
||||
: paymentMethodType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
totalAmount: freezed == totalAmount
|
||||
? _value.totalAmount
|
||||
: totalAmount // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
orderCount: freezed == orderCount
|
||||
? _value.orderCount
|
||||
: orderCount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
paymentCount: freezed == paymentCount
|
||||
? _value.paymentCount
|
||||
: paymentCount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
percentage: freezed == percentage
|
||||
? _value.percentage
|
||||
: percentage // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$PaymentMethodItemDtoImpl extends _PaymentMethodItemDto {
|
||||
const _$PaymentMethodItemDtoImpl({
|
||||
@JsonKey(name: 'payment_method_id') this.paymentMethodId,
|
||||
@JsonKey(name: 'payment_method_name') this.paymentMethodName,
|
||||
@JsonKey(name: 'payment_method_type') this.paymentMethodType,
|
||||
@JsonKey(name: 'total_amount') this.totalAmount,
|
||||
@JsonKey(name: 'order_count') this.orderCount,
|
||||
@JsonKey(name: 'payment_count') this.paymentCount,
|
||||
@JsonKey(name: 'percentage') this.percentage,
|
||||
}) : super._();
|
||||
|
||||
factory _$PaymentMethodItemDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PaymentMethodItemDtoImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'payment_method_id')
|
||||
final String? paymentMethodId;
|
||||
@override
|
||||
@JsonKey(name: 'payment_method_name')
|
||||
final String? paymentMethodName;
|
||||
@override
|
||||
@JsonKey(name: 'payment_method_type')
|
||||
final String? paymentMethodType;
|
||||
@override
|
||||
@JsonKey(name: 'total_amount')
|
||||
final num? totalAmount;
|
||||
@override
|
||||
@JsonKey(name: 'order_count')
|
||||
final int? orderCount;
|
||||
@override
|
||||
@JsonKey(name: 'payment_count')
|
||||
final int? paymentCount;
|
||||
@override
|
||||
@JsonKey(name: 'percentage')
|
||||
final double? percentage;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PaymentMethodItemDto(paymentMethodId: $paymentMethodId, paymentMethodName: $paymentMethodName, paymentMethodType: $paymentMethodType, totalAmount: $totalAmount, orderCount: $orderCount, paymentCount: $paymentCount, percentage: $percentage)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$PaymentMethodItemDtoImpl &&
|
||||
(identical(other.paymentMethodId, paymentMethodId) ||
|
||||
other.paymentMethodId == paymentMethodId) &&
|
||||
(identical(other.paymentMethodName, paymentMethodName) ||
|
||||
other.paymentMethodName == paymentMethodName) &&
|
||||
(identical(other.paymentMethodType, paymentMethodType) ||
|
||||
other.paymentMethodType == paymentMethodType) &&
|
||||
(identical(other.totalAmount, totalAmount) ||
|
||||
other.totalAmount == totalAmount) &&
|
||||
(identical(other.orderCount, orderCount) ||
|
||||
other.orderCount == orderCount) &&
|
||||
(identical(other.paymentCount, paymentCount) ||
|
||||
other.paymentCount == paymentCount) &&
|
||||
(identical(other.percentage, percentage) ||
|
||||
other.percentage == percentage));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
paymentMethodId,
|
||||
paymentMethodName,
|
||||
paymentMethodType,
|
||||
totalAmount,
|
||||
orderCount,
|
||||
paymentCount,
|
||||
percentage,
|
||||
);
|
||||
|
||||
/// Create a copy of PaymentMethodItemDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PaymentMethodItemDtoImplCopyWith<_$PaymentMethodItemDtoImpl>
|
||||
get copyWith =>
|
||||
__$$PaymentMethodItemDtoImplCopyWithImpl<_$PaymentMethodItemDtoImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$PaymentMethodItemDtoImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _PaymentMethodItemDto extends PaymentMethodItemDto {
|
||||
const factory _PaymentMethodItemDto({
|
||||
@JsonKey(name: 'payment_method_id') final String? paymentMethodId,
|
||||
@JsonKey(name: 'payment_method_name') final String? paymentMethodName,
|
||||
@JsonKey(name: 'payment_method_type') final String? paymentMethodType,
|
||||
@JsonKey(name: 'total_amount') final num? totalAmount,
|
||||
@JsonKey(name: 'order_count') final int? orderCount,
|
||||
@JsonKey(name: 'payment_count') final int? paymentCount,
|
||||
@JsonKey(name: 'percentage') final double? percentage,
|
||||
}) = _$PaymentMethodItemDtoImpl;
|
||||
const _PaymentMethodItemDto._() : super._();
|
||||
|
||||
factory _PaymentMethodItemDto.fromJson(Map<String, dynamic> json) =
|
||||
_$PaymentMethodItemDtoImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'payment_method_id')
|
||||
String? get paymentMethodId;
|
||||
@override
|
||||
@JsonKey(name: 'payment_method_name')
|
||||
String? get paymentMethodName;
|
||||
@override
|
||||
@JsonKey(name: 'payment_method_type')
|
||||
String? get paymentMethodType;
|
||||
@override
|
||||
@JsonKey(name: 'total_amount')
|
||||
num? get totalAmount;
|
||||
@override
|
||||
@JsonKey(name: 'order_count')
|
||||
int? get orderCount;
|
||||
@override
|
||||
@JsonKey(name: 'payment_count')
|
||||
int? get paymentCount;
|
||||
@override
|
||||
@JsonKey(name: 'percentage')
|
||||
double? get percentage;
|
||||
|
||||
/// Create a copy of PaymentMethodItemDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PaymentMethodItemDtoImplCopyWith<_$PaymentMethodItemDtoImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
PaymentMethodSummaryDto _$PaymentMethodSummaryDtoFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) {
|
||||
return _PaymentMethodSummaryDto.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$PaymentMethodSummaryDto {
|
||||
@JsonKey(name: 'total_amount')
|
||||
num? get totalAmount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_orders')
|
||||
int? get totalOrders => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_payments')
|
||||
int? get totalPayments => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'average_order_value')
|
||||
double? get averageOrderValue => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this PaymentMethodSummaryDto to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of PaymentMethodSummaryDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$PaymentMethodSummaryDtoCopyWith<PaymentMethodSummaryDto> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PaymentMethodSummaryDtoCopyWith<$Res> {
|
||||
factory $PaymentMethodSummaryDtoCopyWith(
|
||||
PaymentMethodSummaryDto value,
|
||||
$Res Function(PaymentMethodSummaryDto) then,
|
||||
) = _$PaymentMethodSummaryDtoCopyWithImpl<$Res, PaymentMethodSummaryDto>;
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: 'total_amount') num? totalAmount,
|
||||
@JsonKey(name: 'total_orders') int? totalOrders,
|
||||
@JsonKey(name: 'total_payments') int? totalPayments,
|
||||
@JsonKey(name: 'average_order_value') double? averageOrderValue,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PaymentMethodSummaryDtoCopyWithImpl<
|
||||
$Res,
|
||||
$Val extends PaymentMethodSummaryDto
|
||||
>
|
||||
implements $PaymentMethodSummaryDtoCopyWith<$Res> {
|
||||
_$PaymentMethodSummaryDtoCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of PaymentMethodSummaryDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? totalAmount = freezed,
|
||||
Object? totalOrders = freezed,
|
||||
Object? totalPayments = freezed,
|
||||
Object? averageOrderValue = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
totalAmount: freezed == totalAmount
|
||||
? _value.totalAmount
|
||||
: totalAmount // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
totalOrders: freezed == totalOrders
|
||||
? _value.totalOrders
|
||||
: totalOrders // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalPayments: freezed == totalPayments
|
||||
? _value.totalPayments
|
||||
: totalPayments // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
averageOrderValue: freezed == averageOrderValue
|
||||
? _value.averageOrderValue
|
||||
: averageOrderValue // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PaymentMethodSummaryDtoImplCopyWith<$Res>
|
||||
implements $PaymentMethodSummaryDtoCopyWith<$Res> {
|
||||
factory _$$PaymentMethodSummaryDtoImplCopyWith(
|
||||
_$PaymentMethodSummaryDtoImpl value,
|
||||
$Res Function(_$PaymentMethodSummaryDtoImpl) then,
|
||||
) = __$$PaymentMethodSummaryDtoImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: 'total_amount') num? totalAmount,
|
||||
@JsonKey(name: 'total_orders') int? totalOrders,
|
||||
@JsonKey(name: 'total_payments') int? totalPayments,
|
||||
@JsonKey(name: 'average_order_value') double? averageOrderValue,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PaymentMethodSummaryDtoImplCopyWithImpl<$Res>
|
||||
extends
|
||||
_$PaymentMethodSummaryDtoCopyWithImpl<
|
||||
$Res,
|
||||
_$PaymentMethodSummaryDtoImpl
|
||||
>
|
||||
implements _$$PaymentMethodSummaryDtoImplCopyWith<$Res> {
|
||||
__$$PaymentMethodSummaryDtoImplCopyWithImpl(
|
||||
_$PaymentMethodSummaryDtoImpl _value,
|
||||
$Res Function(_$PaymentMethodSummaryDtoImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of PaymentMethodSummaryDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? totalAmount = freezed,
|
||||
Object? totalOrders = freezed,
|
||||
Object? totalPayments = freezed,
|
||||
Object? averageOrderValue = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_$PaymentMethodSummaryDtoImpl(
|
||||
totalAmount: freezed == totalAmount
|
||||
? _value.totalAmount
|
||||
: totalAmount // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
totalOrders: freezed == totalOrders
|
||||
? _value.totalOrders
|
||||
: totalOrders // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalPayments: freezed == totalPayments
|
||||
? _value.totalPayments
|
||||
: totalPayments // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
averageOrderValue: freezed == averageOrderValue
|
||||
? _value.averageOrderValue
|
||||
: averageOrderValue // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$PaymentMethodSummaryDtoImpl extends _PaymentMethodSummaryDto {
|
||||
const _$PaymentMethodSummaryDtoImpl({
|
||||
@JsonKey(name: 'total_amount') this.totalAmount,
|
||||
@JsonKey(name: 'total_orders') this.totalOrders,
|
||||
@JsonKey(name: 'total_payments') this.totalPayments,
|
||||
@JsonKey(name: 'average_order_value') this.averageOrderValue,
|
||||
}) : super._();
|
||||
|
||||
factory _$PaymentMethodSummaryDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PaymentMethodSummaryDtoImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'total_amount')
|
||||
final num? totalAmount;
|
||||
@override
|
||||
@JsonKey(name: 'total_orders')
|
||||
final int? totalOrders;
|
||||
@override
|
||||
@JsonKey(name: 'total_payments')
|
||||
final int? totalPayments;
|
||||
@override
|
||||
@JsonKey(name: 'average_order_value')
|
||||
final double? averageOrderValue;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PaymentMethodSummaryDto(totalAmount: $totalAmount, totalOrders: $totalOrders, totalPayments: $totalPayments, averageOrderValue: $averageOrderValue)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$PaymentMethodSummaryDtoImpl &&
|
||||
(identical(other.totalAmount, totalAmount) ||
|
||||
other.totalAmount == totalAmount) &&
|
||||
(identical(other.totalOrders, totalOrders) ||
|
||||
other.totalOrders == totalOrders) &&
|
||||
(identical(other.totalPayments, totalPayments) ||
|
||||
other.totalPayments == totalPayments) &&
|
||||
(identical(other.averageOrderValue, averageOrderValue) ||
|
||||
other.averageOrderValue == averageOrderValue));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
totalAmount,
|
||||
totalOrders,
|
||||
totalPayments,
|
||||
averageOrderValue,
|
||||
);
|
||||
|
||||
/// Create a copy of PaymentMethodSummaryDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PaymentMethodSummaryDtoImplCopyWith<_$PaymentMethodSummaryDtoImpl>
|
||||
get copyWith =>
|
||||
__$$PaymentMethodSummaryDtoImplCopyWithImpl<
|
||||
_$PaymentMethodSummaryDtoImpl
|
||||
>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$PaymentMethodSummaryDtoImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _PaymentMethodSummaryDto extends PaymentMethodSummaryDto {
|
||||
const factory _PaymentMethodSummaryDto({
|
||||
@JsonKey(name: 'total_amount') final num? totalAmount,
|
||||
@JsonKey(name: 'total_orders') final int? totalOrders,
|
||||
@JsonKey(name: 'total_payments') final int? totalPayments,
|
||||
@JsonKey(name: 'average_order_value') final double? averageOrderValue,
|
||||
}) = _$PaymentMethodSummaryDtoImpl;
|
||||
const _PaymentMethodSummaryDto._() : super._();
|
||||
|
||||
factory _PaymentMethodSummaryDto.fromJson(Map<String, dynamic> json) =
|
||||
_$PaymentMethodSummaryDtoImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'total_amount')
|
||||
num? get totalAmount;
|
||||
@override
|
||||
@JsonKey(name: 'total_orders')
|
||||
int? get totalOrders;
|
||||
@override
|
||||
@JsonKey(name: 'total_payments')
|
||||
int? get totalPayments;
|
||||
@override
|
||||
@JsonKey(name: 'average_order_value')
|
||||
double? get averageOrderValue;
|
||||
|
||||
/// Create a copy of PaymentMethodSummaryDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PaymentMethodSummaryDtoImplCopyWith<_$PaymentMethodSummaryDtoImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user