apskel-pos-flutter-v2/lib/infrastructure/analytic/analytic_dtos.freezed.dart

8344 lines
290 KiB
Dart
Raw Normal View History

2025-11-03 16:24:11 +07:00
// 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 'analytic_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',
);
DashboardAnalyticDto _$DashboardAnalyticDtoFromJson(Map<String, dynamic> json) {
return _DashboardAnalyticDto.fromJson(json);
}
/// @nodoc
mixin _$DashboardAnalyticDto {
@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: "overview")
DashboardOverviewDto? get overview => throw _privateConstructorUsedError;
@JsonKey(name: "top_products")
List<DashboardTopProductDto>? get topProducts =>
throw _privateConstructorUsedError;
@JsonKey(name: "payment_methods")
List<DashboardPaymentMethodDto>? get paymentMethods =>
throw _privateConstructorUsedError;
@JsonKey(name: "recent_sales")
List<DashboardRecentSaleDto>? get recentSales =>
throw _privateConstructorUsedError;
/// Serializes this DashboardAnalyticDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of DashboardAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DashboardAnalyticDtoCopyWith<DashboardAnalyticDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DashboardAnalyticDtoCopyWith<$Res> {
factory $DashboardAnalyticDtoCopyWith(
DashboardAnalyticDto value,
$Res Function(DashboardAnalyticDto) then,
) = _$DashboardAnalyticDtoCopyWithImpl<$Res, DashboardAnalyticDto>;
@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: "overview") DashboardOverviewDto? overview,
@JsonKey(name: "top_products") List<DashboardTopProductDto>? topProducts,
@JsonKey(name: "payment_methods")
List<DashboardPaymentMethodDto>? paymentMethods,
@JsonKey(name: "recent_sales") List<DashboardRecentSaleDto>? recentSales,
});
$DashboardOverviewDtoCopyWith<$Res>? get overview;
}
/// @nodoc
class _$DashboardAnalyticDtoCopyWithImpl<
$Res,
$Val extends DashboardAnalyticDto
>
implements $DashboardAnalyticDtoCopyWith<$Res> {
_$DashboardAnalyticDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of DashboardAnalyticDto
/// 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? overview = freezed,
Object? topProducts = freezed,
Object? paymentMethods = freezed,
Object? recentSales = 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?,
overview: freezed == overview
? _value.overview
: overview // ignore: cast_nullable_to_non_nullable
as DashboardOverviewDto?,
topProducts: freezed == topProducts
? _value.topProducts
: topProducts // ignore: cast_nullable_to_non_nullable
as List<DashboardTopProductDto>?,
paymentMethods: freezed == paymentMethods
? _value.paymentMethods
: paymentMethods // ignore: cast_nullable_to_non_nullable
as List<DashboardPaymentMethodDto>?,
recentSales: freezed == recentSales
? _value.recentSales
: recentSales // ignore: cast_nullable_to_non_nullable
as List<DashboardRecentSaleDto>?,
)
as $Val,
);
}
/// Create a copy of DashboardAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DashboardOverviewDtoCopyWith<$Res>? get overview {
if (_value.overview == null) {
return null;
}
return $DashboardOverviewDtoCopyWith<$Res>(_value.overview!, (value) {
return _then(_value.copyWith(overview: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$DashboardAnalyticDtoImplCopyWith<$Res>
implements $DashboardAnalyticDtoCopyWith<$Res> {
factory _$$DashboardAnalyticDtoImplCopyWith(
_$DashboardAnalyticDtoImpl value,
$Res Function(_$DashboardAnalyticDtoImpl) then,
) = __$$DashboardAnalyticDtoImplCopyWithImpl<$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: "overview") DashboardOverviewDto? overview,
@JsonKey(name: "top_products") List<DashboardTopProductDto>? topProducts,
@JsonKey(name: "payment_methods")
List<DashboardPaymentMethodDto>? paymentMethods,
@JsonKey(name: "recent_sales") List<DashboardRecentSaleDto>? recentSales,
});
@override
$DashboardOverviewDtoCopyWith<$Res>? get overview;
}
/// @nodoc
class __$$DashboardAnalyticDtoImplCopyWithImpl<$Res>
extends _$DashboardAnalyticDtoCopyWithImpl<$Res, _$DashboardAnalyticDtoImpl>
implements _$$DashboardAnalyticDtoImplCopyWith<$Res> {
__$$DashboardAnalyticDtoImplCopyWithImpl(
_$DashboardAnalyticDtoImpl _value,
$Res Function(_$DashboardAnalyticDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of DashboardAnalyticDto
/// 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? overview = freezed,
Object? topProducts = freezed,
Object? paymentMethods = freezed,
Object? recentSales = freezed,
}) {
return _then(
_$DashboardAnalyticDtoImpl(
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?,
overview: freezed == overview
? _value.overview
: overview // ignore: cast_nullable_to_non_nullable
as DashboardOverviewDto?,
topProducts: freezed == topProducts
? _value._topProducts
: topProducts // ignore: cast_nullable_to_non_nullable
as List<DashboardTopProductDto>?,
paymentMethods: freezed == paymentMethods
? _value._paymentMethods
: paymentMethods // ignore: cast_nullable_to_non_nullable
as List<DashboardPaymentMethodDto>?,
recentSales: freezed == recentSales
? _value._recentSales
: recentSales // ignore: cast_nullable_to_non_nullable
as List<DashboardRecentSaleDto>?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$DashboardAnalyticDtoImpl extends _DashboardAnalyticDto {
const _$DashboardAnalyticDtoImpl({
@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: "overview") this.overview,
@JsonKey(name: "top_products")
final List<DashboardTopProductDto>? topProducts,
@JsonKey(name: "payment_methods")
final List<DashboardPaymentMethodDto>? paymentMethods,
@JsonKey(name: "recent_sales")
final List<DashboardRecentSaleDto>? recentSales,
}) : _topProducts = topProducts,
_paymentMethods = paymentMethods,
_recentSales = recentSales,
super._();
factory _$DashboardAnalyticDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$DashboardAnalyticDtoImplFromJson(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: "overview")
final DashboardOverviewDto? overview;
final List<DashboardTopProductDto>? _topProducts;
@override
@JsonKey(name: "top_products")
List<DashboardTopProductDto>? get topProducts {
final value = _topProducts;
if (value == null) return null;
if (_topProducts is EqualUnmodifiableListView) return _topProducts;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
final List<DashboardPaymentMethodDto>? _paymentMethods;
@override
@JsonKey(name: "payment_methods")
List<DashboardPaymentMethodDto>? get paymentMethods {
final value = _paymentMethods;
if (value == null) return null;
if (_paymentMethods is EqualUnmodifiableListView) return _paymentMethods;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
final List<DashboardRecentSaleDto>? _recentSales;
@override
@JsonKey(name: "recent_sales")
List<DashboardRecentSaleDto>? get recentSales {
final value = _recentSales;
if (value == null) return null;
if (_recentSales is EqualUnmodifiableListView) return _recentSales;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override
String toString() {
return 'DashboardAnalyticDto(organizationId: $organizationId, outletId: $outletId, dateFrom: $dateFrom, dateTo: $dateTo, overview: $overview, topProducts: $topProducts, paymentMethods: $paymentMethods, recentSales: $recentSales)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DashboardAnalyticDtoImpl &&
(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.overview, overview) ||
other.overview == overview) &&
const DeepCollectionEquality().equals(
other._topProducts,
_topProducts,
) &&
const DeepCollectionEquality().equals(
other._paymentMethods,
_paymentMethods,
) &&
const DeepCollectionEquality().equals(
other._recentSales,
_recentSales,
));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
organizationId,
outletId,
dateFrom,
dateTo,
overview,
const DeepCollectionEquality().hash(_topProducts),
const DeepCollectionEquality().hash(_paymentMethods),
const DeepCollectionEquality().hash(_recentSales),
);
/// Create a copy of DashboardAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DashboardAnalyticDtoImplCopyWith<_$DashboardAnalyticDtoImpl>
get copyWith =>
__$$DashboardAnalyticDtoImplCopyWithImpl<_$DashboardAnalyticDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$DashboardAnalyticDtoImplToJson(this);
}
}
abstract class _DashboardAnalyticDto extends DashboardAnalyticDto {
const factory _DashboardAnalyticDto({
@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: "overview") final DashboardOverviewDto? overview,
@JsonKey(name: "top_products")
final List<DashboardTopProductDto>? topProducts,
@JsonKey(name: "payment_methods")
final List<DashboardPaymentMethodDto>? paymentMethods,
@JsonKey(name: "recent_sales")
final List<DashboardRecentSaleDto>? recentSales,
}) = _$DashboardAnalyticDtoImpl;
const _DashboardAnalyticDto._() : super._();
factory _DashboardAnalyticDto.fromJson(Map<String, dynamic> json) =
_$DashboardAnalyticDtoImpl.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: "overview")
DashboardOverviewDto? get overview;
@override
@JsonKey(name: "top_products")
List<DashboardTopProductDto>? get topProducts;
@override
@JsonKey(name: "payment_methods")
List<DashboardPaymentMethodDto>? get paymentMethods;
@override
@JsonKey(name: "recent_sales")
List<DashboardRecentSaleDto>? get recentSales;
/// Create a copy of DashboardAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DashboardAnalyticDtoImplCopyWith<_$DashboardAnalyticDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}
DashboardOverviewDto _$DashboardOverviewDtoFromJson(Map<String, dynamic> json) {
return _DashboardOverviewDto.fromJson(json);
}
/// @nodoc
mixin _$DashboardOverviewDto {
@JsonKey(name: "total_sales")
int? get totalSales => throw _privateConstructorUsedError;
@JsonKey(name: "total_orders")
int? get totalOrders => throw _privateConstructorUsedError;
@JsonKey(name: "average_order_value")
double? get averageOrderValue => throw _privateConstructorUsedError;
@JsonKey(name: "total_customers")
int? get totalCustomers => throw _privateConstructorUsedError;
@JsonKey(name: "voided_orders")
int? get voidedOrders => throw _privateConstructorUsedError;
@JsonKey(name: "refunded_orders")
int? get refundedOrders => throw _privateConstructorUsedError;
/// Serializes this DashboardOverviewDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of DashboardOverviewDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DashboardOverviewDtoCopyWith<DashboardOverviewDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DashboardOverviewDtoCopyWith<$Res> {
factory $DashboardOverviewDtoCopyWith(
DashboardOverviewDto value,
$Res Function(DashboardOverviewDto) then,
) = _$DashboardOverviewDtoCopyWithImpl<$Res, DashboardOverviewDto>;
@useResult
$Res call({
@JsonKey(name: "total_sales") int? totalSales,
@JsonKey(name: "total_orders") int? totalOrders,
@JsonKey(name: "average_order_value") double? averageOrderValue,
@JsonKey(name: "total_customers") int? totalCustomers,
@JsonKey(name: "voided_orders") int? voidedOrders,
@JsonKey(name: "refunded_orders") int? refundedOrders,
});
}
/// @nodoc
class _$DashboardOverviewDtoCopyWithImpl<
$Res,
$Val extends DashboardOverviewDto
>
implements $DashboardOverviewDtoCopyWith<$Res> {
_$DashboardOverviewDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of DashboardOverviewDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? totalSales = freezed,
Object? totalOrders = freezed,
Object? averageOrderValue = freezed,
Object? totalCustomers = freezed,
Object? voidedOrders = freezed,
Object? refundedOrders = freezed,
}) {
return _then(
_value.copyWith(
totalSales: freezed == totalSales
? _value.totalSales
: totalSales // ignore: cast_nullable_to_non_nullable
as int?,
totalOrders: freezed == totalOrders
? _value.totalOrders
: totalOrders // ignore: cast_nullable_to_non_nullable
as int?,
averageOrderValue: freezed == averageOrderValue
? _value.averageOrderValue
: averageOrderValue // ignore: cast_nullable_to_non_nullable
as double?,
totalCustomers: freezed == totalCustomers
? _value.totalCustomers
: totalCustomers // ignore: cast_nullable_to_non_nullable
as int?,
voidedOrders: freezed == voidedOrders
? _value.voidedOrders
: voidedOrders // ignore: cast_nullable_to_non_nullable
as int?,
refundedOrders: freezed == refundedOrders
? _value.refundedOrders
: refundedOrders // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$DashboardOverviewDtoImplCopyWith<$Res>
implements $DashboardOverviewDtoCopyWith<$Res> {
factory _$$DashboardOverviewDtoImplCopyWith(
_$DashboardOverviewDtoImpl value,
$Res Function(_$DashboardOverviewDtoImpl) then,
) = __$$DashboardOverviewDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "total_sales") int? totalSales,
@JsonKey(name: "total_orders") int? totalOrders,
@JsonKey(name: "average_order_value") double? averageOrderValue,
@JsonKey(name: "total_customers") int? totalCustomers,
@JsonKey(name: "voided_orders") int? voidedOrders,
@JsonKey(name: "refunded_orders") int? refundedOrders,
});
}
/// @nodoc
class __$$DashboardOverviewDtoImplCopyWithImpl<$Res>
extends _$DashboardOverviewDtoCopyWithImpl<$Res, _$DashboardOverviewDtoImpl>
implements _$$DashboardOverviewDtoImplCopyWith<$Res> {
__$$DashboardOverviewDtoImplCopyWithImpl(
_$DashboardOverviewDtoImpl _value,
$Res Function(_$DashboardOverviewDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of DashboardOverviewDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? totalSales = freezed,
Object? totalOrders = freezed,
Object? averageOrderValue = freezed,
Object? totalCustomers = freezed,
Object? voidedOrders = freezed,
Object? refundedOrders = freezed,
}) {
return _then(
_$DashboardOverviewDtoImpl(
totalSales: freezed == totalSales
? _value.totalSales
: totalSales // ignore: cast_nullable_to_non_nullable
as int?,
totalOrders: freezed == totalOrders
? _value.totalOrders
: totalOrders // ignore: cast_nullable_to_non_nullable
as int?,
averageOrderValue: freezed == averageOrderValue
? _value.averageOrderValue
: averageOrderValue // ignore: cast_nullable_to_non_nullable
as double?,
totalCustomers: freezed == totalCustomers
? _value.totalCustomers
: totalCustomers // ignore: cast_nullable_to_non_nullable
as int?,
voidedOrders: freezed == voidedOrders
? _value.voidedOrders
: voidedOrders // ignore: cast_nullable_to_non_nullable
as int?,
refundedOrders: freezed == refundedOrders
? _value.refundedOrders
: refundedOrders // ignore: cast_nullable_to_non_nullable
as int?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$DashboardOverviewDtoImpl extends _DashboardOverviewDto {
const _$DashboardOverviewDtoImpl({
@JsonKey(name: "total_sales") this.totalSales,
@JsonKey(name: "total_orders") this.totalOrders,
@JsonKey(name: "average_order_value") this.averageOrderValue,
@JsonKey(name: "total_customers") this.totalCustomers,
@JsonKey(name: "voided_orders") this.voidedOrders,
@JsonKey(name: "refunded_orders") this.refundedOrders,
}) : super._();
factory _$DashboardOverviewDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$DashboardOverviewDtoImplFromJson(json);
@override
@JsonKey(name: "total_sales")
final int? totalSales;
@override
@JsonKey(name: "total_orders")
final int? totalOrders;
@override
@JsonKey(name: "average_order_value")
final double? averageOrderValue;
@override
@JsonKey(name: "total_customers")
final int? totalCustomers;
@override
@JsonKey(name: "voided_orders")
final int? voidedOrders;
@override
@JsonKey(name: "refunded_orders")
final int? refundedOrders;
@override
String toString() {
return 'DashboardOverviewDto(totalSales: $totalSales, totalOrders: $totalOrders, averageOrderValue: $averageOrderValue, totalCustomers: $totalCustomers, voidedOrders: $voidedOrders, refundedOrders: $refundedOrders)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DashboardOverviewDtoImpl &&
(identical(other.totalSales, totalSales) ||
other.totalSales == totalSales) &&
(identical(other.totalOrders, totalOrders) ||
other.totalOrders == totalOrders) &&
(identical(other.averageOrderValue, averageOrderValue) ||
other.averageOrderValue == averageOrderValue) &&
(identical(other.totalCustomers, totalCustomers) ||
other.totalCustomers == totalCustomers) &&
(identical(other.voidedOrders, voidedOrders) ||
other.voidedOrders == voidedOrders) &&
(identical(other.refundedOrders, refundedOrders) ||
other.refundedOrders == refundedOrders));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
totalSales,
totalOrders,
averageOrderValue,
totalCustomers,
voidedOrders,
refundedOrders,
);
/// Create a copy of DashboardOverviewDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DashboardOverviewDtoImplCopyWith<_$DashboardOverviewDtoImpl>
get copyWith =>
__$$DashboardOverviewDtoImplCopyWithImpl<_$DashboardOverviewDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$DashboardOverviewDtoImplToJson(this);
}
}
abstract class _DashboardOverviewDto extends DashboardOverviewDto {
const factory _DashboardOverviewDto({
@JsonKey(name: "total_sales") final int? totalSales,
@JsonKey(name: "total_orders") final int? totalOrders,
@JsonKey(name: "average_order_value") final double? averageOrderValue,
@JsonKey(name: "total_customers") final int? totalCustomers,
@JsonKey(name: "voided_orders") final int? voidedOrders,
@JsonKey(name: "refunded_orders") final int? refundedOrders,
}) = _$DashboardOverviewDtoImpl;
const _DashboardOverviewDto._() : super._();
factory _DashboardOverviewDto.fromJson(Map<String, dynamic> json) =
_$DashboardOverviewDtoImpl.fromJson;
@override
@JsonKey(name: "total_sales")
int? get totalSales;
@override
@JsonKey(name: "total_orders")
int? get totalOrders;
@override
@JsonKey(name: "average_order_value")
double? get averageOrderValue;
@override
@JsonKey(name: "total_customers")
int? get totalCustomers;
@override
@JsonKey(name: "voided_orders")
int? get voidedOrders;
@override
@JsonKey(name: "refunded_orders")
int? get refundedOrders;
/// Create a copy of DashboardOverviewDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DashboardOverviewDtoImplCopyWith<_$DashboardOverviewDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}
DashboardTopProductDto _$DashboardTopProductDtoFromJson(
Map<String, dynamic> json,
) {
return _DashboardTopProductDto.fromJson(json);
}
/// @nodoc
mixin _$DashboardTopProductDto {
@JsonKey(name: "product_id")
String? get productId => throw _privateConstructorUsedError;
@JsonKey(name: "product_name")
String? get productName => throw _privateConstructorUsedError;
@JsonKey(name: "category_id")
String? get categoryId => throw _privateConstructorUsedError;
@JsonKey(name: "category_name")
String? get categoryName => throw _privateConstructorUsedError;
@JsonKey(name: "quantity_sold")
int? get quantitySold => throw _privateConstructorUsedError;
@JsonKey(name: "revenue")
int? get revenue => throw _privateConstructorUsedError;
@JsonKey(name: "average_price")
double? get averagePrice => throw _privateConstructorUsedError;
@JsonKey(name: "order_count")
int? get orderCount => throw _privateConstructorUsedError;
/// Serializes this DashboardTopProductDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of DashboardTopProductDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DashboardTopProductDtoCopyWith<DashboardTopProductDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DashboardTopProductDtoCopyWith<$Res> {
factory $DashboardTopProductDtoCopyWith(
DashboardTopProductDto value,
$Res Function(DashboardTopProductDto) then,
) = _$DashboardTopProductDtoCopyWithImpl<$Res, DashboardTopProductDto>;
@useResult
$Res call({
@JsonKey(name: "product_id") String? productId,
@JsonKey(name: "product_name") String? productName,
@JsonKey(name: "category_id") String? categoryId,
@JsonKey(name: "category_name") String? categoryName,
@JsonKey(name: "quantity_sold") int? quantitySold,
@JsonKey(name: "revenue") int? revenue,
@JsonKey(name: "average_price") double? averagePrice,
@JsonKey(name: "order_count") int? orderCount,
});
}
/// @nodoc
class _$DashboardTopProductDtoCopyWithImpl<
$Res,
$Val extends DashboardTopProductDto
>
implements $DashboardTopProductDtoCopyWith<$Res> {
_$DashboardTopProductDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of DashboardTopProductDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? productId = freezed,
Object? productName = freezed,
Object? categoryId = freezed,
Object? categoryName = freezed,
Object? quantitySold = freezed,
Object? revenue = freezed,
Object? averagePrice = freezed,
Object? orderCount = freezed,
}) {
return _then(
_value.copyWith(
productId: freezed == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String?,
productName: freezed == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String?,
categoryId: freezed == categoryId
? _value.categoryId
: categoryId // ignore: cast_nullable_to_non_nullable
as String?,
categoryName: freezed == categoryName
? _value.categoryName
: categoryName // ignore: cast_nullable_to_non_nullable
as String?,
quantitySold: freezed == quantitySold
? _value.quantitySold
: quantitySold // ignore: cast_nullable_to_non_nullable
as int?,
revenue: freezed == revenue
? _value.revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int?,
averagePrice: freezed == averagePrice
? _value.averagePrice
: averagePrice // ignore: cast_nullable_to_non_nullable
as double?,
orderCount: freezed == orderCount
? _value.orderCount
: orderCount // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$DashboardTopProductDtoImplCopyWith<$Res>
implements $DashboardTopProductDtoCopyWith<$Res> {
factory _$$DashboardTopProductDtoImplCopyWith(
_$DashboardTopProductDtoImpl value,
$Res Function(_$DashboardTopProductDtoImpl) then,
) = __$$DashboardTopProductDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "product_id") String? productId,
@JsonKey(name: "product_name") String? productName,
@JsonKey(name: "category_id") String? categoryId,
@JsonKey(name: "category_name") String? categoryName,
@JsonKey(name: "quantity_sold") int? quantitySold,
@JsonKey(name: "revenue") int? revenue,
@JsonKey(name: "average_price") double? averagePrice,
@JsonKey(name: "order_count") int? orderCount,
});
}
/// @nodoc
class __$$DashboardTopProductDtoImplCopyWithImpl<$Res>
extends
_$DashboardTopProductDtoCopyWithImpl<$Res, _$DashboardTopProductDtoImpl>
implements _$$DashboardTopProductDtoImplCopyWith<$Res> {
__$$DashboardTopProductDtoImplCopyWithImpl(
_$DashboardTopProductDtoImpl _value,
$Res Function(_$DashboardTopProductDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of DashboardTopProductDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? productId = freezed,
Object? productName = freezed,
Object? categoryId = freezed,
Object? categoryName = freezed,
Object? quantitySold = freezed,
Object? revenue = freezed,
Object? averagePrice = freezed,
Object? orderCount = freezed,
}) {
return _then(
_$DashboardTopProductDtoImpl(
productId: freezed == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String?,
productName: freezed == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String?,
categoryId: freezed == categoryId
? _value.categoryId
: categoryId // ignore: cast_nullable_to_non_nullable
as String?,
categoryName: freezed == categoryName
? _value.categoryName
: categoryName // ignore: cast_nullable_to_non_nullable
as String?,
quantitySold: freezed == quantitySold
? _value.quantitySold
: quantitySold // ignore: cast_nullable_to_non_nullable
as int?,
revenue: freezed == revenue
? _value.revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int?,
averagePrice: freezed == averagePrice
? _value.averagePrice
: averagePrice // ignore: cast_nullable_to_non_nullable
as double?,
orderCount: freezed == orderCount
? _value.orderCount
: orderCount // ignore: cast_nullable_to_non_nullable
as int?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$DashboardTopProductDtoImpl extends _DashboardTopProductDto {
const _$DashboardTopProductDtoImpl({
@JsonKey(name: "product_id") this.productId,
@JsonKey(name: "product_name") this.productName,
@JsonKey(name: "category_id") this.categoryId,
@JsonKey(name: "category_name") this.categoryName,
@JsonKey(name: "quantity_sold") this.quantitySold,
@JsonKey(name: "revenue") this.revenue,
@JsonKey(name: "average_price") this.averagePrice,
@JsonKey(name: "order_count") this.orderCount,
}) : super._();
factory _$DashboardTopProductDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$DashboardTopProductDtoImplFromJson(json);
@override
@JsonKey(name: "product_id")
final String? productId;
@override
@JsonKey(name: "product_name")
final String? productName;
@override
@JsonKey(name: "category_id")
final String? categoryId;
@override
@JsonKey(name: "category_name")
final String? categoryName;
@override
@JsonKey(name: "quantity_sold")
final int? quantitySold;
@override
@JsonKey(name: "revenue")
final int? revenue;
@override
@JsonKey(name: "average_price")
final double? averagePrice;
@override
@JsonKey(name: "order_count")
final int? orderCount;
@override
String toString() {
return 'DashboardTopProductDto(productId: $productId, productName: $productName, categoryId: $categoryId, categoryName: $categoryName, quantitySold: $quantitySold, revenue: $revenue, averagePrice: $averagePrice, orderCount: $orderCount)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DashboardTopProductDtoImpl &&
(identical(other.productId, productId) ||
other.productId == productId) &&
(identical(other.productName, productName) ||
other.productName == productName) &&
(identical(other.categoryId, categoryId) ||
other.categoryId == categoryId) &&
(identical(other.categoryName, categoryName) ||
other.categoryName == categoryName) &&
(identical(other.quantitySold, quantitySold) ||
other.quantitySold == quantitySold) &&
(identical(other.revenue, revenue) || other.revenue == revenue) &&
(identical(other.averagePrice, averagePrice) ||
other.averagePrice == averagePrice) &&
(identical(other.orderCount, orderCount) ||
other.orderCount == orderCount));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
productId,
productName,
categoryId,
categoryName,
quantitySold,
revenue,
averagePrice,
orderCount,
);
/// Create a copy of DashboardTopProductDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DashboardTopProductDtoImplCopyWith<_$DashboardTopProductDtoImpl>
get copyWith =>
__$$DashboardTopProductDtoImplCopyWithImpl<_$DashboardTopProductDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$DashboardTopProductDtoImplToJson(this);
}
}
abstract class _DashboardTopProductDto extends DashboardTopProductDto {
const factory _DashboardTopProductDto({
@JsonKey(name: "product_id") final String? productId,
@JsonKey(name: "product_name") final String? productName,
@JsonKey(name: "category_id") final String? categoryId,
@JsonKey(name: "category_name") final String? categoryName,
@JsonKey(name: "quantity_sold") final int? quantitySold,
@JsonKey(name: "revenue") final int? revenue,
@JsonKey(name: "average_price") final double? averagePrice,
@JsonKey(name: "order_count") final int? orderCount,
}) = _$DashboardTopProductDtoImpl;
const _DashboardTopProductDto._() : super._();
factory _DashboardTopProductDto.fromJson(Map<String, dynamic> json) =
_$DashboardTopProductDtoImpl.fromJson;
@override
@JsonKey(name: "product_id")
String? get productId;
@override
@JsonKey(name: "product_name")
String? get productName;
@override
@JsonKey(name: "category_id")
String? get categoryId;
@override
@JsonKey(name: "category_name")
String? get categoryName;
@override
@JsonKey(name: "quantity_sold")
int? get quantitySold;
@override
@JsonKey(name: "revenue")
int? get revenue;
@override
@JsonKey(name: "average_price")
double? get averagePrice;
@override
@JsonKey(name: "order_count")
int? get orderCount;
/// Create a copy of DashboardTopProductDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DashboardTopProductDtoImplCopyWith<_$DashboardTopProductDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}
DashboardPaymentMethodDto _$DashboardPaymentMethodDtoFromJson(
Map<String, dynamic> json,
) {
return _DashboardPaymentMethodDto.fromJson(json);
}
/// @nodoc
mixin _$DashboardPaymentMethodDto {
@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")
int? 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 DashboardPaymentMethodDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of DashboardPaymentMethodDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DashboardPaymentMethodDtoCopyWith<DashboardPaymentMethodDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DashboardPaymentMethodDtoCopyWith<$Res> {
factory $DashboardPaymentMethodDtoCopyWith(
DashboardPaymentMethodDto value,
$Res Function(DashboardPaymentMethodDto) then,
) = _$DashboardPaymentMethodDtoCopyWithImpl<$Res, DashboardPaymentMethodDto>;
@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") int? totalAmount,
@JsonKey(name: "order_count") int? orderCount,
@JsonKey(name: "payment_count") int? paymentCount,
@JsonKey(name: "percentage") double? percentage,
});
}
/// @nodoc
class _$DashboardPaymentMethodDtoCopyWithImpl<
$Res,
$Val extends DashboardPaymentMethodDto
>
implements $DashboardPaymentMethodDtoCopyWith<$Res> {
_$DashboardPaymentMethodDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of DashboardPaymentMethodDto
/// 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 int?,
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 _$$DashboardPaymentMethodDtoImplCopyWith<$Res>
implements $DashboardPaymentMethodDtoCopyWith<$Res> {
factory _$$DashboardPaymentMethodDtoImplCopyWith(
_$DashboardPaymentMethodDtoImpl value,
$Res Function(_$DashboardPaymentMethodDtoImpl) then,
) = __$$DashboardPaymentMethodDtoImplCopyWithImpl<$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") int? totalAmount,
@JsonKey(name: "order_count") int? orderCount,
@JsonKey(name: "payment_count") int? paymentCount,
@JsonKey(name: "percentage") double? percentage,
});
}
/// @nodoc
class __$$DashboardPaymentMethodDtoImplCopyWithImpl<$Res>
extends
_$DashboardPaymentMethodDtoCopyWithImpl<
$Res,
_$DashboardPaymentMethodDtoImpl
>
implements _$$DashboardPaymentMethodDtoImplCopyWith<$Res> {
__$$DashboardPaymentMethodDtoImplCopyWithImpl(
_$DashboardPaymentMethodDtoImpl _value,
$Res Function(_$DashboardPaymentMethodDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of DashboardPaymentMethodDto
/// 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(
_$DashboardPaymentMethodDtoImpl(
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 int?,
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 _$DashboardPaymentMethodDtoImpl extends _DashboardPaymentMethodDto {
const _$DashboardPaymentMethodDtoImpl({
@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 _$DashboardPaymentMethodDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$DashboardPaymentMethodDtoImplFromJson(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 int? 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 'DashboardPaymentMethodDto(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 _$DashboardPaymentMethodDtoImpl &&
(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 DashboardPaymentMethodDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DashboardPaymentMethodDtoImplCopyWith<_$DashboardPaymentMethodDtoImpl>
get copyWith =>
__$$DashboardPaymentMethodDtoImplCopyWithImpl<
_$DashboardPaymentMethodDtoImpl
>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$DashboardPaymentMethodDtoImplToJson(this);
}
}
abstract class _DashboardPaymentMethodDto extends DashboardPaymentMethodDto {
const factory _DashboardPaymentMethodDto({
@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 int? totalAmount,
@JsonKey(name: "order_count") final int? orderCount,
@JsonKey(name: "payment_count") final int? paymentCount,
@JsonKey(name: "percentage") final double? percentage,
}) = _$DashboardPaymentMethodDtoImpl;
const _DashboardPaymentMethodDto._() : super._();
factory _DashboardPaymentMethodDto.fromJson(Map<String, dynamic> json) =
_$DashboardPaymentMethodDtoImpl.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")
int? 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 DashboardPaymentMethodDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DashboardPaymentMethodDtoImplCopyWith<_$DashboardPaymentMethodDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}
DashboardRecentSaleDto _$DashboardRecentSaleDtoFromJson(
Map<String, dynamic> json,
) {
return _DashboardRecentSaleDto.fromJson(json);
}
/// @nodoc
mixin _$DashboardRecentSaleDto {
@JsonKey(name: "date")
String? get date => throw _privateConstructorUsedError;
@JsonKey(name: "sales")
int? get sales => throw _privateConstructorUsedError;
@JsonKey(name: "orders")
int? get orders => throw _privateConstructorUsedError;
@JsonKey(name: "items")
int? get items => throw _privateConstructorUsedError;
@JsonKey(name: "tax")
int? get tax => throw _privateConstructorUsedError;
@JsonKey(name: "discount")
int? get discount => throw _privateConstructorUsedError;
@JsonKey(name: "net_sales")
int? get netSales => throw _privateConstructorUsedError;
/// Serializes this DashboardRecentSaleDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of DashboardRecentSaleDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DashboardRecentSaleDtoCopyWith<DashboardRecentSaleDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DashboardRecentSaleDtoCopyWith<$Res> {
factory $DashboardRecentSaleDtoCopyWith(
DashboardRecentSaleDto value,
$Res Function(DashboardRecentSaleDto) then,
) = _$DashboardRecentSaleDtoCopyWithImpl<$Res, DashboardRecentSaleDto>;
@useResult
$Res call({
@JsonKey(name: "date") String? date,
@JsonKey(name: "sales") int? sales,
@JsonKey(name: "orders") int? orders,
@JsonKey(name: "items") int? items,
@JsonKey(name: "tax") int? tax,
@JsonKey(name: "discount") int? discount,
@JsonKey(name: "net_sales") int? netSales,
});
}
/// @nodoc
class _$DashboardRecentSaleDtoCopyWithImpl<
$Res,
$Val extends DashboardRecentSaleDto
>
implements $DashboardRecentSaleDtoCopyWith<$Res> {
_$DashboardRecentSaleDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of DashboardRecentSaleDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? date = freezed,
Object? sales = freezed,
Object? orders = freezed,
Object? items = freezed,
Object? tax = freezed,
Object? discount = freezed,
Object? netSales = freezed,
}) {
return _then(
_value.copyWith(
date: freezed == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as String?,
sales: freezed == sales
? _value.sales
: sales // ignore: cast_nullable_to_non_nullable
as int?,
orders: freezed == orders
? _value.orders
: orders // ignore: cast_nullable_to_non_nullable
as int?,
items: freezed == items
? _value.items
: items // ignore: cast_nullable_to_non_nullable
as int?,
tax: freezed == tax
? _value.tax
: tax // ignore: cast_nullable_to_non_nullable
as int?,
discount: freezed == discount
? _value.discount
: discount // ignore: cast_nullable_to_non_nullable
as int?,
netSales: freezed == netSales
? _value.netSales
: netSales // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$DashboardRecentSaleDtoImplCopyWith<$Res>
implements $DashboardRecentSaleDtoCopyWith<$Res> {
factory _$$DashboardRecentSaleDtoImplCopyWith(
_$DashboardRecentSaleDtoImpl value,
$Res Function(_$DashboardRecentSaleDtoImpl) then,
) = __$$DashboardRecentSaleDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "date") String? date,
@JsonKey(name: "sales") int? sales,
@JsonKey(name: "orders") int? orders,
@JsonKey(name: "items") int? items,
@JsonKey(name: "tax") int? tax,
@JsonKey(name: "discount") int? discount,
@JsonKey(name: "net_sales") int? netSales,
});
}
/// @nodoc
class __$$DashboardRecentSaleDtoImplCopyWithImpl<$Res>
extends
_$DashboardRecentSaleDtoCopyWithImpl<$Res, _$DashboardRecentSaleDtoImpl>
implements _$$DashboardRecentSaleDtoImplCopyWith<$Res> {
__$$DashboardRecentSaleDtoImplCopyWithImpl(
_$DashboardRecentSaleDtoImpl _value,
$Res Function(_$DashboardRecentSaleDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of DashboardRecentSaleDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? date = freezed,
Object? sales = freezed,
Object? orders = freezed,
Object? items = freezed,
Object? tax = freezed,
Object? discount = freezed,
Object? netSales = freezed,
}) {
return _then(
_$DashboardRecentSaleDtoImpl(
date: freezed == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as String?,
sales: freezed == sales
? _value.sales
: sales // ignore: cast_nullable_to_non_nullable
as int?,
orders: freezed == orders
? _value.orders
: orders // ignore: cast_nullable_to_non_nullable
as int?,
items: freezed == items
? _value.items
: items // ignore: cast_nullable_to_non_nullable
as int?,
tax: freezed == tax
? _value.tax
: tax // ignore: cast_nullable_to_non_nullable
as int?,
discount: freezed == discount
? _value.discount
: discount // ignore: cast_nullable_to_non_nullable
as int?,
netSales: freezed == netSales
? _value.netSales
: netSales // ignore: cast_nullable_to_non_nullable
as int?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$DashboardRecentSaleDtoImpl extends _DashboardRecentSaleDto {
const _$DashboardRecentSaleDtoImpl({
@JsonKey(name: "date") this.date,
@JsonKey(name: "sales") this.sales,
@JsonKey(name: "orders") this.orders,
@JsonKey(name: "items") this.items,
@JsonKey(name: "tax") this.tax,
@JsonKey(name: "discount") this.discount,
@JsonKey(name: "net_sales") this.netSales,
}) : super._();
factory _$DashboardRecentSaleDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$DashboardRecentSaleDtoImplFromJson(json);
@override
@JsonKey(name: "date")
final String? date;
@override
@JsonKey(name: "sales")
final int? sales;
@override
@JsonKey(name: "orders")
final int? orders;
@override
@JsonKey(name: "items")
final int? items;
@override
@JsonKey(name: "tax")
final int? tax;
@override
@JsonKey(name: "discount")
final int? discount;
@override
@JsonKey(name: "net_sales")
final int? netSales;
@override
String toString() {
return 'DashboardRecentSaleDto(date: $date, sales: $sales, orders: $orders, items: $items, tax: $tax, discount: $discount, netSales: $netSales)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DashboardRecentSaleDtoImpl &&
(identical(other.date, date) || other.date == date) &&
(identical(other.sales, sales) || other.sales == sales) &&
(identical(other.orders, orders) || other.orders == orders) &&
(identical(other.items, items) || other.items == items) &&
(identical(other.tax, tax) || other.tax == tax) &&
(identical(other.discount, discount) ||
other.discount == discount) &&
(identical(other.netSales, netSales) ||
other.netSales == netSales));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
date,
sales,
orders,
items,
tax,
discount,
netSales,
);
/// Create a copy of DashboardRecentSaleDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DashboardRecentSaleDtoImplCopyWith<_$DashboardRecentSaleDtoImpl>
get copyWith =>
__$$DashboardRecentSaleDtoImplCopyWithImpl<_$DashboardRecentSaleDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$DashboardRecentSaleDtoImplToJson(this);
}
}
abstract class _DashboardRecentSaleDto extends DashboardRecentSaleDto {
const factory _DashboardRecentSaleDto({
@JsonKey(name: "date") final String? date,
@JsonKey(name: "sales") final int? sales,
@JsonKey(name: "orders") final int? orders,
@JsonKey(name: "items") final int? items,
@JsonKey(name: "tax") final int? tax,
@JsonKey(name: "discount") final int? discount,
@JsonKey(name: "net_sales") final int? netSales,
}) = _$DashboardRecentSaleDtoImpl;
const _DashboardRecentSaleDto._() : super._();
factory _DashboardRecentSaleDto.fromJson(Map<String, dynamic> json) =
_$DashboardRecentSaleDtoImpl.fromJson;
@override
@JsonKey(name: "date")
String? get date;
@override
@JsonKey(name: "sales")
int? get sales;
@override
@JsonKey(name: "orders")
int? get orders;
@override
@JsonKey(name: "items")
int? get items;
@override
@JsonKey(name: "tax")
int? get tax;
@override
@JsonKey(name: "discount")
int? get discount;
@override
@JsonKey(name: "net_sales")
int? get netSales;
/// Create a copy of DashboardRecentSaleDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DashboardRecentSaleDtoImplCopyWith<_$DashboardRecentSaleDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}
2025-11-03 17:18:29 +07:00
SalesAnalyticDto _$SalesAnalyticDtoFromJson(Map<String, dynamic> json) {
return _SalesAnalyticDto.fromJson(json);
}
/// @nodoc
mixin _$SalesAnalyticDto {
@JsonKey(name: "organization_id")
String? get organizationId => throw _privateConstructorUsedError;
@JsonKey(name: "outlet_id")
String? get outletId => throw _privateConstructorUsedError;
@JsonKey(name: "date_from")
DateTime? get dateFrom => throw _privateConstructorUsedError;
@JsonKey(name: "date_to")
DateTime? get dateTo => throw _privateConstructorUsedError;
@JsonKey(name: "group_by")
String? get groupBy => throw _privateConstructorUsedError;
@JsonKey(name: "summary")
SalesSummaryDto? get summary => throw _privateConstructorUsedError;
@JsonKey(name: "data")
List<SalesAnalyticItemDto>? get data => throw _privateConstructorUsedError;
/// Serializes this SalesAnalyticDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SalesAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$SalesAnalyticDtoCopyWith<SalesAnalyticDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SalesAnalyticDtoCopyWith<$Res> {
factory $SalesAnalyticDtoCopyWith(
SalesAnalyticDto value,
$Res Function(SalesAnalyticDto) then,
) = _$SalesAnalyticDtoCopyWithImpl<$Res, SalesAnalyticDto>;
@useResult
$Res call({
@JsonKey(name: "organization_id") String? organizationId,
@JsonKey(name: "outlet_id") String? outletId,
@JsonKey(name: "date_from") DateTime? dateFrom,
@JsonKey(name: "date_to") DateTime? dateTo,
@JsonKey(name: "group_by") String? groupBy,
@JsonKey(name: "summary") SalesSummaryDto? summary,
@JsonKey(name: "data") List<SalesAnalyticItemDto>? data,
});
$SalesSummaryDtoCopyWith<$Res>? get summary;
}
/// @nodoc
class _$SalesAnalyticDtoCopyWithImpl<$Res, $Val extends SalesAnalyticDto>
implements $SalesAnalyticDtoCopyWith<$Res> {
_$SalesAnalyticDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SalesAnalyticDto
/// 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 DateTime?,
dateTo: freezed == dateTo
? _value.dateTo
: dateTo // ignore: cast_nullable_to_non_nullable
as DateTime?,
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 SalesSummaryDto?,
data: freezed == data
? _value.data
: data // ignore: cast_nullable_to_non_nullable
as List<SalesAnalyticItemDto>?,
)
as $Val,
);
}
/// Create a copy of SalesAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$SalesSummaryDtoCopyWith<$Res>? get summary {
if (_value.summary == null) {
return null;
}
return $SalesSummaryDtoCopyWith<$Res>(_value.summary!, (value) {
return _then(_value.copyWith(summary: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$SalesAnalyticDtoImplCopyWith<$Res>
implements $SalesAnalyticDtoCopyWith<$Res> {
factory _$$SalesAnalyticDtoImplCopyWith(
_$SalesAnalyticDtoImpl value,
$Res Function(_$SalesAnalyticDtoImpl) then,
) = __$$SalesAnalyticDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "organization_id") String? organizationId,
@JsonKey(name: "outlet_id") String? outletId,
@JsonKey(name: "date_from") DateTime? dateFrom,
@JsonKey(name: "date_to") DateTime? dateTo,
@JsonKey(name: "group_by") String? groupBy,
@JsonKey(name: "summary") SalesSummaryDto? summary,
@JsonKey(name: "data") List<SalesAnalyticItemDto>? data,
});
@override
$SalesSummaryDtoCopyWith<$Res>? get summary;
}
/// @nodoc
class __$$SalesAnalyticDtoImplCopyWithImpl<$Res>
extends _$SalesAnalyticDtoCopyWithImpl<$Res, _$SalesAnalyticDtoImpl>
implements _$$SalesAnalyticDtoImplCopyWith<$Res> {
__$$SalesAnalyticDtoImplCopyWithImpl(
_$SalesAnalyticDtoImpl _value,
$Res Function(_$SalesAnalyticDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of SalesAnalyticDto
/// 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(
_$SalesAnalyticDtoImpl(
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 DateTime?,
dateTo: freezed == dateTo
? _value.dateTo
: dateTo // ignore: cast_nullable_to_non_nullable
as DateTime?,
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 SalesSummaryDto?,
data: freezed == data
? _value._data
: data // ignore: cast_nullable_to_non_nullable
as List<SalesAnalyticItemDto>?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$SalesAnalyticDtoImpl extends _SalesAnalyticDto {
const _$SalesAnalyticDtoImpl({
@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<SalesAnalyticItemDto>? data,
}) : _data = data,
super._();
factory _$SalesAnalyticDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$SalesAnalyticDtoImplFromJson(json);
@override
@JsonKey(name: "organization_id")
final String? organizationId;
@override
@JsonKey(name: "outlet_id")
final String? outletId;
@override
@JsonKey(name: "date_from")
final DateTime? dateFrom;
@override
@JsonKey(name: "date_to")
final DateTime? dateTo;
@override
@JsonKey(name: "group_by")
final String? groupBy;
@override
@JsonKey(name: "summary")
final SalesSummaryDto? summary;
final List<SalesAnalyticItemDto>? _data;
@override
@JsonKey(name: "data")
List<SalesAnalyticItemDto>? 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 'SalesAnalyticDto(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 _$SalesAnalyticDtoImpl &&
(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 SalesAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$SalesAnalyticDtoImplCopyWith<_$SalesAnalyticDtoImpl> get copyWith =>
__$$SalesAnalyticDtoImplCopyWithImpl<_$SalesAnalyticDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$SalesAnalyticDtoImplToJson(this);
}
}
abstract class _SalesAnalyticDto extends SalesAnalyticDto {
const factory _SalesAnalyticDto({
@JsonKey(name: "organization_id") final String? organizationId,
@JsonKey(name: "outlet_id") final String? outletId,
@JsonKey(name: "date_from") final DateTime? dateFrom,
@JsonKey(name: "date_to") final DateTime? dateTo,
@JsonKey(name: "group_by") final String? groupBy,
@JsonKey(name: "summary") final SalesSummaryDto? summary,
@JsonKey(name: "data") final List<SalesAnalyticItemDto>? data,
}) = _$SalesAnalyticDtoImpl;
const _SalesAnalyticDto._() : super._();
factory _SalesAnalyticDto.fromJson(Map<String, dynamic> json) =
_$SalesAnalyticDtoImpl.fromJson;
@override
@JsonKey(name: "organization_id")
String? get organizationId;
@override
@JsonKey(name: "outlet_id")
String? get outletId;
@override
@JsonKey(name: "date_from")
DateTime? get dateFrom;
@override
@JsonKey(name: "date_to")
DateTime? get dateTo;
@override
@JsonKey(name: "group_by")
String? get groupBy;
@override
@JsonKey(name: "summary")
SalesSummaryDto? get summary;
@override
@JsonKey(name: "data")
List<SalesAnalyticItemDto>? get data;
/// Create a copy of SalesAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$SalesAnalyticDtoImplCopyWith<_$SalesAnalyticDtoImpl> get copyWith =>
throw _privateConstructorUsedError;
}
SalesSummaryDto _$SalesSummaryDtoFromJson(Map<String, dynamic> json) {
return _SalesSummaryDto.fromJson(json);
}
/// @nodoc
mixin _$SalesSummaryDto {
@JsonKey(name: "total_sales")
int? get totalSales => throw _privateConstructorUsedError;
@JsonKey(name: "total_orders")
int? get totalOrders => throw _privateConstructorUsedError;
@JsonKey(name: "total_items")
int? get totalItems => throw _privateConstructorUsedError;
@JsonKey(name: "average_order_value")
double? get averageOrderValue => throw _privateConstructorUsedError;
@JsonKey(name: "total_tax")
int? get totalTax => throw _privateConstructorUsedError;
@JsonKey(name: "total_discount")
int? get totalDiscount => throw _privateConstructorUsedError;
@JsonKey(name: "net_sales")
int? get netSales => throw _privateConstructorUsedError;
/// Serializes this SalesSummaryDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SalesSummaryDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$SalesSummaryDtoCopyWith<SalesSummaryDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SalesSummaryDtoCopyWith<$Res> {
factory $SalesSummaryDtoCopyWith(
SalesSummaryDto value,
$Res Function(SalesSummaryDto) then,
) = _$SalesSummaryDtoCopyWithImpl<$Res, SalesSummaryDto>;
@useResult
$Res call({
@JsonKey(name: "total_sales") int? totalSales,
@JsonKey(name: "total_orders") int? totalOrders,
@JsonKey(name: "total_items") int? totalItems,
@JsonKey(name: "average_order_value") double? averageOrderValue,
@JsonKey(name: "total_tax") int? totalTax,
@JsonKey(name: "total_discount") int? totalDiscount,
@JsonKey(name: "net_sales") int? netSales,
});
}
/// @nodoc
class _$SalesSummaryDtoCopyWithImpl<$Res, $Val extends SalesSummaryDto>
implements $SalesSummaryDtoCopyWith<$Res> {
_$SalesSummaryDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SalesSummaryDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? totalSales = freezed,
Object? totalOrders = freezed,
Object? totalItems = freezed,
Object? averageOrderValue = freezed,
Object? totalTax = freezed,
Object? totalDiscount = freezed,
Object? netSales = freezed,
}) {
return _then(
_value.copyWith(
totalSales: freezed == totalSales
? _value.totalSales
: totalSales // ignore: cast_nullable_to_non_nullable
as int?,
totalOrders: freezed == totalOrders
? _value.totalOrders
: totalOrders // ignore: cast_nullable_to_non_nullable
as int?,
totalItems: freezed == totalItems
? _value.totalItems
: totalItems // ignore: cast_nullable_to_non_nullable
as int?,
averageOrderValue: freezed == averageOrderValue
? _value.averageOrderValue
: averageOrderValue // ignore: cast_nullable_to_non_nullable
as double?,
totalTax: freezed == totalTax
? _value.totalTax
: totalTax // ignore: cast_nullable_to_non_nullable
as int?,
totalDiscount: freezed == totalDiscount
? _value.totalDiscount
: totalDiscount // ignore: cast_nullable_to_non_nullable
as int?,
netSales: freezed == netSales
? _value.netSales
: netSales // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$SalesSummaryDtoImplCopyWith<$Res>
implements $SalesSummaryDtoCopyWith<$Res> {
factory _$$SalesSummaryDtoImplCopyWith(
_$SalesSummaryDtoImpl value,
$Res Function(_$SalesSummaryDtoImpl) then,
) = __$$SalesSummaryDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "total_sales") int? totalSales,
@JsonKey(name: "total_orders") int? totalOrders,
@JsonKey(name: "total_items") int? totalItems,
@JsonKey(name: "average_order_value") double? averageOrderValue,
@JsonKey(name: "total_tax") int? totalTax,
@JsonKey(name: "total_discount") int? totalDiscount,
@JsonKey(name: "net_sales") int? netSales,
});
}
/// @nodoc
class __$$SalesSummaryDtoImplCopyWithImpl<$Res>
extends _$SalesSummaryDtoCopyWithImpl<$Res, _$SalesSummaryDtoImpl>
implements _$$SalesSummaryDtoImplCopyWith<$Res> {
__$$SalesSummaryDtoImplCopyWithImpl(
_$SalesSummaryDtoImpl _value,
$Res Function(_$SalesSummaryDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of SalesSummaryDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? totalSales = freezed,
Object? totalOrders = freezed,
Object? totalItems = freezed,
Object? averageOrderValue = freezed,
Object? totalTax = freezed,
Object? totalDiscount = freezed,
Object? netSales = freezed,
}) {
return _then(
_$SalesSummaryDtoImpl(
totalSales: freezed == totalSales
? _value.totalSales
: totalSales // ignore: cast_nullable_to_non_nullable
as int?,
totalOrders: freezed == totalOrders
? _value.totalOrders
: totalOrders // ignore: cast_nullable_to_non_nullable
as int?,
totalItems: freezed == totalItems
? _value.totalItems
: totalItems // ignore: cast_nullable_to_non_nullable
as int?,
averageOrderValue: freezed == averageOrderValue
? _value.averageOrderValue
: averageOrderValue // ignore: cast_nullable_to_non_nullable
as double?,
totalTax: freezed == totalTax
? _value.totalTax
: totalTax // ignore: cast_nullable_to_non_nullable
as int?,
totalDiscount: freezed == totalDiscount
? _value.totalDiscount
: totalDiscount // ignore: cast_nullable_to_non_nullable
as int?,
netSales: freezed == netSales
? _value.netSales
: netSales // ignore: cast_nullable_to_non_nullable
as int?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$SalesSummaryDtoImpl extends _SalesSummaryDto {
const _$SalesSummaryDtoImpl({
@JsonKey(name: "total_sales") this.totalSales,
@JsonKey(name: "total_orders") this.totalOrders,
@JsonKey(name: "total_items") this.totalItems,
@JsonKey(name: "average_order_value") this.averageOrderValue,
@JsonKey(name: "total_tax") this.totalTax,
@JsonKey(name: "total_discount") this.totalDiscount,
@JsonKey(name: "net_sales") this.netSales,
}) : super._();
factory _$SalesSummaryDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$SalesSummaryDtoImplFromJson(json);
@override
@JsonKey(name: "total_sales")
final int? totalSales;
@override
@JsonKey(name: "total_orders")
final int? totalOrders;
@override
@JsonKey(name: "total_items")
final int? totalItems;
@override
@JsonKey(name: "average_order_value")
final double? averageOrderValue;
@override
@JsonKey(name: "total_tax")
final int? totalTax;
@override
@JsonKey(name: "total_discount")
final int? totalDiscount;
@override
@JsonKey(name: "net_sales")
final int? netSales;
@override
String toString() {
return 'SalesSummaryDto(totalSales: $totalSales, totalOrders: $totalOrders, totalItems: $totalItems, averageOrderValue: $averageOrderValue, totalTax: $totalTax, totalDiscount: $totalDiscount, netSales: $netSales)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SalesSummaryDtoImpl &&
(identical(other.totalSales, totalSales) ||
other.totalSales == totalSales) &&
(identical(other.totalOrders, totalOrders) ||
other.totalOrders == totalOrders) &&
(identical(other.totalItems, totalItems) ||
other.totalItems == totalItems) &&
(identical(other.averageOrderValue, averageOrderValue) ||
other.averageOrderValue == averageOrderValue) &&
(identical(other.totalTax, totalTax) ||
other.totalTax == totalTax) &&
(identical(other.totalDiscount, totalDiscount) ||
other.totalDiscount == totalDiscount) &&
(identical(other.netSales, netSales) ||
other.netSales == netSales));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
totalSales,
totalOrders,
totalItems,
averageOrderValue,
totalTax,
totalDiscount,
netSales,
);
/// Create a copy of SalesSummaryDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$SalesSummaryDtoImplCopyWith<_$SalesSummaryDtoImpl> get copyWith =>
__$$SalesSummaryDtoImplCopyWithImpl<_$SalesSummaryDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$SalesSummaryDtoImplToJson(this);
}
}
abstract class _SalesSummaryDto extends SalesSummaryDto {
const factory _SalesSummaryDto({
@JsonKey(name: "total_sales") final int? totalSales,
@JsonKey(name: "total_orders") final int? totalOrders,
@JsonKey(name: "total_items") final int? totalItems,
@JsonKey(name: "average_order_value") final double? averageOrderValue,
@JsonKey(name: "total_tax") final int? totalTax,
@JsonKey(name: "total_discount") final int? totalDiscount,
@JsonKey(name: "net_sales") final int? netSales,
}) = _$SalesSummaryDtoImpl;
const _SalesSummaryDto._() : super._();
factory _SalesSummaryDto.fromJson(Map<String, dynamic> json) =
_$SalesSummaryDtoImpl.fromJson;
@override
@JsonKey(name: "total_sales")
int? get totalSales;
@override
@JsonKey(name: "total_orders")
int? get totalOrders;
@override
@JsonKey(name: "total_items")
int? get totalItems;
@override
@JsonKey(name: "average_order_value")
double? get averageOrderValue;
@override
@JsonKey(name: "total_tax")
int? get totalTax;
@override
@JsonKey(name: "total_discount")
int? get totalDiscount;
@override
@JsonKey(name: "net_sales")
int? get netSales;
/// Create a copy of SalesSummaryDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$SalesSummaryDtoImplCopyWith<_$SalesSummaryDtoImpl> get copyWith =>
throw _privateConstructorUsedError;
}
SalesAnalyticItemDto _$SalesAnalyticItemDtoFromJson(Map<String, dynamic> json) {
return _SalesAnalyticItemDto.fromJson(json);
}
/// @nodoc
mixin _$SalesAnalyticItemDto {
@JsonKey(name: "date")
DateTime? get date => throw _privateConstructorUsedError;
@JsonKey(name: "sales")
int? get sales => throw _privateConstructorUsedError;
@JsonKey(name: "orders")
int? get orders => throw _privateConstructorUsedError;
@JsonKey(name: "items")
int? get items => throw _privateConstructorUsedError;
@JsonKey(name: "tax")
int? get tax => throw _privateConstructorUsedError;
@JsonKey(name: "discount")
int? get discount => throw _privateConstructorUsedError;
@JsonKey(name: "net_sales")
int? get netSales => throw _privateConstructorUsedError;
/// Serializes this SalesAnalyticItemDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of SalesAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$SalesAnalyticItemDtoCopyWith<SalesAnalyticItemDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SalesAnalyticItemDtoCopyWith<$Res> {
factory $SalesAnalyticItemDtoCopyWith(
SalesAnalyticItemDto value,
$Res Function(SalesAnalyticItemDto) then,
) = _$SalesAnalyticItemDtoCopyWithImpl<$Res, SalesAnalyticItemDto>;
@useResult
$Res call({
@JsonKey(name: "date") DateTime? date,
@JsonKey(name: "sales") int? sales,
@JsonKey(name: "orders") int? orders,
@JsonKey(name: "items") int? items,
@JsonKey(name: "tax") int? tax,
@JsonKey(name: "discount") int? discount,
@JsonKey(name: "net_sales") int? netSales,
});
}
/// @nodoc
class _$SalesAnalyticItemDtoCopyWithImpl<
$Res,
$Val extends SalesAnalyticItemDto
>
implements $SalesAnalyticItemDtoCopyWith<$Res> {
_$SalesAnalyticItemDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SalesAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? date = freezed,
Object? sales = freezed,
Object? orders = freezed,
Object? items = freezed,
Object? tax = freezed,
Object? discount = freezed,
Object? netSales = freezed,
}) {
return _then(
_value.copyWith(
date: freezed == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as DateTime?,
sales: freezed == sales
? _value.sales
: sales // ignore: cast_nullable_to_non_nullable
as int?,
orders: freezed == orders
? _value.orders
: orders // ignore: cast_nullable_to_non_nullable
as int?,
items: freezed == items
? _value.items
: items // ignore: cast_nullable_to_non_nullable
as int?,
tax: freezed == tax
? _value.tax
: tax // ignore: cast_nullable_to_non_nullable
as int?,
discount: freezed == discount
? _value.discount
: discount // ignore: cast_nullable_to_non_nullable
as int?,
netSales: freezed == netSales
? _value.netSales
: netSales // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$SalesAnalyticItemDtoImplCopyWith<$Res>
implements $SalesAnalyticItemDtoCopyWith<$Res> {
factory _$$SalesAnalyticItemDtoImplCopyWith(
_$SalesAnalyticItemDtoImpl value,
$Res Function(_$SalesAnalyticItemDtoImpl) then,
) = __$$SalesAnalyticItemDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "date") DateTime? date,
@JsonKey(name: "sales") int? sales,
@JsonKey(name: "orders") int? orders,
@JsonKey(name: "items") int? items,
@JsonKey(name: "tax") int? tax,
@JsonKey(name: "discount") int? discount,
@JsonKey(name: "net_sales") int? netSales,
});
}
/// @nodoc
class __$$SalesAnalyticItemDtoImplCopyWithImpl<$Res>
extends _$SalesAnalyticItemDtoCopyWithImpl<$Res, _$SalesAnalyticItemDtoImpl>
implements _$$SalesAnalyticItemDtoImplCopyWith<$Res> {
__$$SalesAnalyticItemDtoImplCopyWithImpl(
_$SalesAnalyticItemDtoImpl _value,
$Res Function(_$SalesAnalyticItemDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of SalesAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? date = freezed,
Object? sales = freezed,
Object? orders = freezed,
Object? items = freezed,
Object? tax = freezed,
Object? discount = freezed,
Object? netSales = freezed,
}) {
return _then(
_$SalesAnalyticItemDtoImpl(
date: freezed == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as DateTime?,
sales: freezed == sales
? _value.sales
: sales // ignore: cast_nullable_to_non_nullable
as int?,
orders: freezed == orders
? _value.orders
: orders // ignore: cast_nullable_to_non_nullable
as int?,
items: freezed == items
? _value.items
: items // ignore: cast_nullable_to_non_nullable
as int?,
tax: freezed == tax
? _value.tax
: tax // ignore: cast_nullable_to_non_nullable
as int?,
discount: freezed == discount
? _value.discount
: discount // ignore: cast_nullable_to_non_nullable
as int?,
netSales: freezed == netSales
? _value.netSales
: netSales // ignore: cast_nullable_to_non_nullable
as int?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$SalesAnalyticItemDtoImpl extends _SalesAnalyticItemDto {
const _$SalesAnalyticItemDtoImpl({
@JsonKey(name: "date") this.date,
@JsonKey(name: "sales") this.sales,
@JsonKey(name: "orders") this.orders,
@JsonKey(name: "items") this.items,
@JsonKey(name: "tax") this.tax,
@JsonKey(name: "discount") this.discount,
@JsonKey(name: "net_sales") this.netSales,
}) : super._();
factory _$SalesAnalyticItemDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$SalesAnalyticItemDtoImplFromJson(json);
@override
@JsonKey(name: "date")
final DateTime? date;
@override
@JsonKey(name: "sales")
final int? sales;
@override
@JsonKey(name: "orders")
final int? orders;
@override
@JsonKey(name: "items")
final int? items;
@override
@JsonKey(name: "tax")
final int? tax;
@override
@JsonKey(name: "discount")
final int? discount;
@override
@JsonKey(name: "net_sales")
final int? netSales;
@override
String toString() {
return 'SalesAnalyticItemDto(date: $date, sales: $sales, orders: $orders, items: $items, tax: $tax, discount: $discount, netSales: $netSales)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SalesAnalyticItemDtoImpl &&
(identical(other.date, date) || other.date == date) &&
(identical(other.sales, sales) || other.sales == sales) &&
(identical(other.orders, orders) || other.orders == orders) &&
(identical(other.items, items) || other.items == items) &&
(identical(other.tax, tax) || other.tax == tax) &&
(identical(other.discount, discount) ||
other.discount == discount) &&
(identical(other.netSales, netSales) ||
other.netSales == netSales));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
date,
sales,
orders,
items,
tax,
discount,
netSales,
);
/// Create a copy of SalesAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$SalesAnalyticItemDtoImplCopyWith<_$SalesAnalyticItemDtoImpl>
get copyWith =>
__$$SalesAnalyticItemDtoImplCopyWithImpl<_$SalesAnalyticItemDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$SalesAnalyticItemDtoImplToJson(this);
}
}
abstract class _SalesAnalyticItemDto extends SalesAnalyticItemDto {
const factory _SalesAnalyticItemDto({
@JsonKey(name: "date") final DateTime? date,
@JsonKey(name: "sales") final int? sales,
@JsonKey(name: "orders") final int? orders,
@JsonKey(name: "items") final int? items,
@JsonKey(name: "tax") final int? tax,
@JsonKey(name: "discount") final int? discount,
@JsonKey(name: "net_sales") final int? netSales,
}) = _$SalesAnalyticItemDtoImpl;
const _SalesAnalyticItemDto._() : super._();
factory _SalesAnalyticItemDto.fromJson(Map<String, dynamic> json) =
_$SalesAnalyticItemDtoImpl.fromJson;
@override
@JsonKey(name: "date")
DateTime? get date;
@override
@JsonKey(name: "sales")
int? get sales;
@override
@JsonKey(name: "orders")
int? get orders;
@override
@JsonKey(name: "items")
int? get items;
@override
@JsonKey(name: "tax")
int? get tax;
@override
@JsonKey(name: "discount")
int? get discount;
@override
@JsonKey(name: "net_sales")
int? get netSales;
/// Create a copy of SalesAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$SalesAnalyticItemDtoImplCopyWith<_$SalesAnalyticItemDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}
2025-11-03 19:34:46 +07:00
ProductAnalyticDto _$ProductAnalyticDtoFromJson(Map<String, dynamic> json) {
return _ProductAnalyticDto.fromJson(json);
}
/// @nodoc
mixin _$ProductAnalyticDto {
@JsonKey(name: "organization_id")
String? get organizationId => throw _privateConstructorUsedError;
@JsonKey(name: "outlet_id")
String? get outletId => throw _privateConstructorUsedError;
@JsonKey(name: "date_from")
DateTime? get dateFrom => throw _privateConstructorUsedError;
@JsonKey(name: "date_to")
DateTime? get dateTo => throw _privateConstructorUsedError;
@JsonKey(name: "data")
List<ProductAnalyticItemDto>? get data => throw _privateConstructorUsedError;
/// Serializes this ProductAnalyticDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of ProductAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProductAnalyticDtoCopyWith<ProductAnalyticDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProductAnalyticDtoCopyWith<$Res> {
factory $ProductAnalyticDtoCopyWith(
ProductAnalyticDto value,
$Res Function(ProductAnalyticDto) then,
) = _$ProductAnalyticDtoCopyWithImpl<$Res, ProductAnalyticDto>;
@useResult
$Res call({
@JsonKey(name: "organization_id") String? organizationId,
@JsonKey(name: "outlet_id") String? outletId,
@JsonKey(name: "date_from") DateTime? dateFrom,
@JsonKey(name: "date_to") DateTime? dateTo,
@JsonKey(name: "data") List<ProductAnalyticItemDto>? data,
});
}
/// @nodoc
class _$ProductAnalyticDtoCopyWithImpl<$Res, $Val extends ProductAnalyticDto>
implements $ProductAnalyticDtoCopyWith<$Res> {
_$ProductAnalyticDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ProductAnalyticDto
/// 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? 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 DateTime?,
dateTo: freezed == dateTo
? _value.dateTo
: dateTo // ignore: cast_nullable_to_non_nullable
as DateTime?,
data: freezed == data
? _value.data
: data // ignore: cast_nullable_to_non_nullable
as List<ProductAnalyticItemDto>?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$ProductAnalyticDtoImplCopyWith<$Res>
implements $ProductAnalyticDtoCopyWith<$Res> {
factory _$$ProductAnalyticDtoImplCopyWith(
_$ProductAnalyticDtoImpl value,
$Res Function(_$ProductAnalyticDtoImpl) then,
) = __$$ProductAnalyticDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "organization_id") String? organizationId,
@JsonKey(name: "outlet_id") String? outletId,
@JsonKey(name: "date_from") DateTime? dateFrom,
@JsonKey(name: "date_to") DateTime? dateTo,
@JsonKey(name: "data") List<ProductAnalyticItemDto>? data,
});
}
/// @nodoc
class __$$ProductAnalyticDtoImplCopyWithImpl<$Res>
extends _$ProductAnalyticDtoCopyWithImpl<$Res, _$ProductAnalyticDtoImpl>
implements _$$ProductAnalyticDtoImplCopyWith<$Res> {
__$$ProductAnalyticDtoImplCopyWithImpl(
_$ProductAnalyticDtoImpl _value,
$Res Function(_$ProductAnalyticDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of ProductAnalyticDto
/// 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? data = freezed,
}) {
return _then(
_$ProductAnalyticDtoImpl(
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 DateTime?,
dateTo: freezed == dateTo
? _value.dateTo
: dateTo // ignore: cast_nullable_to_non_nullable
as DateTime?,
data: freezed == data
? _value._data
: data // ignore: cast_nullable_to_non_nullable
as List<ProductAnalyticItemDto>?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$ProductAnalyticDtoImpl extends _ProductAnalyticDto {
const _$ProductAnalyticDtoImpl({
@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: "data") final List<ProductAnalyticItemDto>? data,
}) : _data = data,
super._();
factory _$ProductAnalyticDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$ProductAnalyticDtoImplFromJson(json);
@override
@JsonKey(name: "organization_id")
final String? organizationId;
@override
@JsonKey(name: "outlet_id")
final String? outletId;
@override
@JsonKey(name: "date_from")
final DateTime? dateFrom;
@override
@JsonKey(name: "date_to")
final DateTime? dateTo;
final List<ProductAnalyticItemDto>? _data;
@override
@JsonKey(name: "data")
List<ProductAnalyticItemDto>? 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 'ProductAnalyticDto(organizationId: $organizationId, outletId: $outletId, dateFrom: $dateFrom, dateTo: $dateTo, data: $data)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProductAnalyticDtoImpl &&
(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) &&
const DeepCollectionEquality().equals(other._data, _data));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
organizationId,
outletId,
dateFrom,
dateTo,
const DeepCollectionEquality().hash(_data),
);
/// Create a copy of ProductAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProductAnalyticDtoImplCopyWith<_$ProductAnalyticDtoImpl> get copyWith =>
__$$ProductAnalyticDtoImplCopyWithImpl<_$ProductAnalyticDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$ProductAnalyticDtoImplToJson(this);
}
}
abstract class _ProductAnalyticDto extends ProductAnalyticDto {
const factory _ProductAnalyticDto({
@JsonKey(name: "organization_id") final String? organizationId,
@JsonKey(name: "outlet_id") final String? outletId,
@JsonKey(name: "date_from") final DateTime? dateFrom,
@JsonKey(name: "date_to") final DateTime? dateTo,
@JsonKey(name: "data") final List<ProductAnalyticItemDto>? data,
}) = _$ProductAnalyticDtoImpl;
const _ProductAnalyticDto._() : super._();
factory _ProductAnalyticDto.fromJson(Map<String, dynamic> json) =
_$ProductAnalyticDtoImpl.fromJson;
@override
@JsonKey(name: "organization_id")
String? get organizationId;
@override
@JsonKey(name: "outlet_id")
String? get outletId;
@override
@JsonKey(name: "date_from")
DateTime? get dateFrom;
@override
@JsonKey(name: "date_to")
DateTime? get dateTo;
@override
@JsonKey(name: "data")
List<ProductAnalyticItemDto>? get data;
/// Create a copy of ProductAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProductAnalyticDtoImplCopyWith<_$ProductAnalyticDtoImpl> get copyWith =>
throw _privateConstructorUsedError;
}
ProductAnalyticItemDto _$ProductAnalyticItemDtoFromJson(
Map<String, dynamic> json,
) {
return _ProductAnalyticItemDto.fromJson(json);
}
/// @nodoc
mixin _$ProductAnalyticItemDto {
@JsonKey(name: "product_id")
String? get productId => throw _privateConstructorUsedError;
@JsonKey(name: "product_name")
String? get productName => throw _privateConstructorUsedError;
@JsonKey(name: "category_id")
String? get categoryId => throw _privateConstructorUsedError;
@JsonKey(name: "category_name")
String? get categoryName => throw _privateConstructorUsedError;
@JsonKey(name: "quantity_sold")
int? get quantitySold => throw _privateConstructorUsedError;
@JsonKey(name: "revenue")
int? get revenue => throw _privateConstructorUsedError;
@JsonKey(name: "average_price")
double? get averagePrice => throw _privateConstructorUsedError;
@JsonKey(name: "order_count")
int? get orderCount => throw _privateConstructorUsedError;
/// Serializes this ProductAnalyticItemDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of ProductAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProductAnalyticItemDtoCopyWith<ProductAnalyticItemDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProductAnalyticItemDtoCopyWith<$Res> {
factory $ProductAnalyticItemDtoCopyWith(
ProductAnalyticItemDto value,
$Res Function(ProductAnalyticItemDto) then,
) = _$ProductAnalyticItemDtoCopyWithImpl<$Res, ProductAnalyticItemDto>;
@useResult
$Res call({
@JsonKey(name: "product_id") String? productId,
@JsonKey(name: "product_name") String? productName,
@JsonKey(name: "category_id") String? categoryId,
@JsonKey(name: "category_name") String? categoryName,
@JsonKey(name: "quantity_sold") int? quantitySold,
@JsonKey(name: "revenue") int? revenue,
@JsonKey(name: "average_price") double? averagePrice,
@JsonKey(name: "order_count") int? orderCount,
});
}
/// @nodoc
class _$ProductAnalyticItemDtoCopyWithImpl<
$Res,
$Val extends ProductAnalyticItemDto
>
implements $ProductAnalyticItemDtoCopyWith<$Res> {
_$ProductAnalyticItemDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ProductAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? productId = freezed,
Object? productName = freezed,
Object? categoryId = freezed,
Object? categoryName = freezed,
Object? quantitySold = freezed,
Object? revenue = freezed,
Object? averagePrice = freezed,
Object? orderCount = freezed,
}) {
return _then(
_value.copyWith(
productId: freezed == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String?,
productName: freezed == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String?,
categoryId: freezed == categoryId
? _value.categoryId
: categoryId // ignore: cast_nullable_to_non_nullable
as String?,
categoryName: freezed == categoryName
? _value.categoryName
: categoryName // ignore: cast_nullable_to_non_nullable
as String?,
quantitySold: freezed == quantitySold
? _value.quantitySold
: quantitySold // ignore: cast_nullable_to_non_nullable
as int?,
revenue: freezed == revenue
? _value.revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int?,
averagePrice: freezed == averagePrice
? _value.averagePrice
: averagePrice // ignore: cast_nullable_to_non_nullable
as double?,
orderCount: freezed == orderCount
? _value.orderCount
: orderCount // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$ProductAnalyticItemDtoImplCopyWith<$Res>
implements $ProductAnalyticItemDtoCopyWith<$Res> {
factory _$$ProductAnalyticItemDtoImplCopyWith(
_$ProductAnalyticItemDtoImpl value,
$Res Function(_$ProductAnalyticItemDtoImpl) then,
) = __$$ProductAnalyticItemDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "product_id") String? productId,
@JsonKey(name: "product_name") String? productName,
@JsonKey(name: "category_id") String? categoryId,
@JsonKey(name: "category_name") String? categoryName,
@JsonKey(name: "quantity_sold") int? quantitySold,
@JsonKey(name: "revenue") int? revenue,
@JsonKey(name: "average_price") double? averagePrice,
@JsonKey(name: "order_count") int? orderCount,
});
}
/// @nodoc
class __$$ProductAnalyticItemDtoImplCopyWithImpl<$Res>
extends
_$ProductAnalyticItemDtoCopyWithImpl<$Res, _$ProductAnalyticItemDtoImpl>
implements _$$ProductAnalyticItemDtoImplCopyWith<$Res> {
__$$ProductAnalyticItemDtoImplCopyWithImpl(
_$ProductAnalyticItemDtoImpl _value,
$Res Function(_$ProductAnalyticItemDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of ProductAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? productId = freezed,
Object? productName = freezed,
Object? categoryId = freezed,
Object? categoryName = freezed,
Object? quantitySold = freezed,
Object? revenue = freezed,
Object? averagePrice = freezed,
Object? orderCount = freezed,
}) {
return _then(
_$ProductAnalyticItemDtoImpl(
productId: freezed == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String?,
productName: freezed == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String?,
categoryId: freezed == categoryId
? _value.categoryId
: categoryId // ignore: cast_nullable_to_non_nullable
as String?,
categoryName: freezed == categoryName
? _value.categoryName
: categoryName // ignore: cast_nullable_to_non_nullable
as String?,
quantitySold: freezed == quantitySold
? _value.quantitySold
: quantitySold // ignore: cast_nullable_to_non_nullable
as int?,
revenue: freezed == revenue
? _value.revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int?,
averagePrice: freezed == averagePrice
? _value.averagePrice
: averagePrice // ignore: cast_nullable_to_non_nullable
as double?,
orderCount: freezed == orderCount
? _value.orderCount
: orderCount // ignore: cast_nullable_to_non_nullable
as int?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$ProductAnalyticItemDtoImpl extends _ProductAnalyticItemDto {
const _$ProductAnalyticItemDtoImpl({
@JsonKey(name: "product_id") this.productId,
@JsonKey(name: "product_name") this.productName,
@JsonKey(name: "category_id") this.categoryId,
@JsonKey(name: "category_name") this.categoryName,
@JsonKey(name: "quantity_sold") this.quantitySold,
@JsonKey(name: "revenue") this.revenue,
@JsonKey(name: "average_price") this.averagePrice,
@JsonKey(name: "order_count") this.orderCount,
}) : super._();
factory _$ProductAnalyticItemDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$ProductAnalyticItemDtoImplFromJson(json);
@override
@JsonKey(name: "product_id")
final String? productId;
@override
@JsonKey(name: "product_name")
final String? productName;
@override
@JsonKey(name: "category_id")
final String? categoryId;
@override
@JsonKey(name: "category_name")
final String? categoryName;
@override
@JsonKey(name: "quantity_sold")
final int? quantitySold;
@override
@JsonKey(name: "revenue")
final int? revenue;
@override
@JsonKey(name: "average_price")
final double? averagePrice;
@override
@JsonKey(name: "order_count")
final int? orderCount;
@override
String toString() {
return 'ProductAnalyticItemDto(productId: $productId, productName: $productName, categoryId: $categoryId, categoryName: $categoryName, quantitySold: $quantitySold, revenue: $revenue, averagePrice: $averagePrice, orderCount: $orderCount)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProductAnalyticItemDtoImpl &&
(identical(other.productId, productId) ||
other.productId == productId) &&
(identical(other.productName, productName) ||
other.productName == productName) &&
(identical(other.categoryId, categoryId) ||
other.categoryId == categoryId) &&
(identical(other.categoryName, categoryName) ||
other.categoryName == categoryName) &&
(identical(other.quantitySold, quantitySold) ||
other.quantitySold == quantitySold) &&
(identical(other.revenue, revenue) || other.revenue == revenue) &&
(identical(other.averagePrice, averagePrice) ||
other.averagePrice == averagePrice) &&
(identical(other.orderCount, orderCount) ||
other.orderCount == orderCount));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
productId,
productName,
categoryId,
categoryName,
quantitySold,
revenue,
averagePrice,
orderCount,
);
/// Create a copy of ProductAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProductAnalyticItemDtoImplCopyWith<_$ProductAnalyticItemDtoImpl>
get copyWith =>
__$$ProductAnalyticItemDtoImplCopyWithImpl<_$ProductAnalyticItemDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$ProductAnalyticItemDtoImplToJson(this);
}
}
abstract class _ProductAnalyticItemDto extends ProductAnalyticItemDto {
const factory _ProductAnalyticItemDto({
@JsonKey(name: "product_id") final String? productId,
@JsonKey(name: "product_name") final String? productName,
@JsonKey(name: "category_id") final String? categoryId,
@JsonKey(name: "category_name") final String? categoryName,
@JsonKey(name: "quantity_sold") final int? quantitySold,
@JsonKey(name: "revenue") final int? revenue,
@JsonKey(name: "average_price") final double? averagePrice,
@JsonKey(name: "order_count") final int? orderCount,
}) = _$ProductAnalyticItemDtoImpl;
const _ProductAnalyticItemDto._() : super._();
factory _ProductAnalyticItemDto.fromJson(Map<String, dynamic> json) =
_$ProductAnalyticItemDtoImpl.fromJson;
@override
@JsonKey(name: "product_id")
String? get productId;
@override
@JsonKey(name: "product_name")
String? get productName;
@override
@JsonKey(name: "category_id")
String? get categoryId;
@override
@JsonKey(name: "category_name")
String? get categoryName;
@override
@JsonKey(name: "quantity_sold")
int? get quantitySold;
@override
@JsonKey(name: "revenue")
int? get revenue;
@override
@JsonKey(name: "average_price")
double? get averagePrice;
@override
@JsonKey(name: "order_count")
int? get orderCount;
/// Create a copy of ProductAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProductAnalyticItemDtoImplCopyWith<_$ProductAnalyticItemDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}
2025-11-03 20:32:46 +07:00
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")
DateTime? get dateFrom => throw _privateConstructorUsedError;
@JsonKey(name: "date_to")
DateTime? get dateTo => throw _privateConstructorUsedError;
@JsonKey(name: "group_by")
String? get groupBy => throw _privateConstructorUsedError;
@JsonKey(name: "summary")
PaymentMethodAnalyticSummaryDto? get summary =>
throw _privateConstructorUsedError;
@JsonKey(name: "data")
List<PaymentMethodAnalyticItemDto>? 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") DateTime? dateFrom,
@JsonKey(name: "date_to") DateTime? dateTo,
@JsonKey(name: "group_by") String? groupBy,
@JsonKey(name: "summary") PaymentMethodAnalyticSummaryDto? summary,
@JsonKey(name: "data") List<PaymentMethodAnalyticItemDto>? data,
});
$PaymentMethodAnalyticSummaryDtoCopyWith<$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 DateTime?,
dateTo: freezed == dateTo
? _value.dateTo
: dateTo // ignore: cast_nullable_to_non_nullable
as DateTime?,
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 PaymentMethodAnalyticSummaryDto?,
data: freezed == data
? _value.data
: data // ignore: cast_nullable_to_non_nullable
as List<PaymentMethodAnalyticItemDto>?,
)
as $Val,
);
}
/// Create a copy of PaymentMethodAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$PaymentMethodAnalyticSummaryDtoCopyWith<$Res>? get summary {
if (_value.summary == null) {
return null;
}
return $PaymentMethodAnalyticSummaryDtoCopyWith<$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") DateTime? dateFrom,
@JsonKey(name: "date_to") DateTime? dateTo,
@JsonKey(name: "group_by") String? groupBy,
@JsonKey(name: "summary") PaymentMethodAnalyticSummaryDto? summary,
@JsonKey(name: "data") List<PaymentMethodAnalyticItemDto>? data,
});
@override
$PaymentMethodAnalyticSummaryDtoCopyWith<$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 DateTime?,
dateTo: freezed == dateTo
? _value.dateTo
: dateTo // ignore: cast_nullable_to_non_nullable
as DateTime?,
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 PaymentMethodAnalyticSummaryDto?,
data: freezed == data
? _value._data
: data // ignore: cast_nullable_to_non_nullable
as List<PaymentMethodAnalyticItemDto>?,
),
);
}
}
/// @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<PaymentMethodAnalyticItemDto>? 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 DateTime? dateFrom;
@override
@JsonKey(name: "date_to")
final DateTime? dateTo;
@override
@JsonKey(name: "group_by")
final String? groupBy;
@override
@JsonKey(name: "summary")
final PaymentMethodAnalyticSummaryDto? summary;
final List<PaymentMethodAnalyticItemDto>? _data;
@override
@JsonKey(name: "data")
List<PaymentMethodAnalyticItemDto>? 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 DateTime? dateFrom,
@JsonKey(name: "date_to") final DateTime? dateTo,
@JsonKey(name: "group_by") final String? groupBy,
@JsonKey(name: "summary") final PaymentMethodAnalyticSummaryDto? summary,
@JsonKey(name: "data") final List<PaymentMethodAnalyticItemDto>? 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")
DateTime? get dateFrom;
@override
@JsonKey(name: "date_to")
DateTime? get dateTo;
@override
@JsonKey(name: "group_by")
String? get groupBy;
@override
@JsonKey(name: "summary")
PaymentMethodAnalyticSummaryDto? get summary;
@override
@JsonKey(name: "data")
List<PaymentMethodAnalyticItemDto>? 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;
}
PaymentMethodAnalyticItemDto _$PaymentMethodAnalyticItemDtoFromJson(
Map<String, dynamic> json,
) {
return _PaymentMethodAnalyticItemDto.fromJson(json);
}
/// @nodoc
mixin _$PaymentMethodAnalyticItemDto {
@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")
int? 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")
num? get percentage => throw _privateConstructorUsedError;
/// Serializes this PaymentMethodAnalyticItemDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of PaymentMethodAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PaymentMethodAnalyticItemDtoCopyWith<PaymentMethodAnalyticItemDto>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PaymentMethodAnalyticItemDtoCopyWith<$Res> {
factory $PaymentMethodAnalyticItemDtoCopyWith(
PaymentMethodAnalyticItemDto value,
$Res Function(PaymentMethodAnalyticItemDto) then,
) =
_$PaymentMethodAnalyticItemDtoCopyWithImpl<
$Res,
PaymentMethodAnalyticItemDto
>;
@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") int? totalAmount,
@JsonKey(name: "order_count") int? orderCount,
@JsonKey(name: "payment_count") int? paymentCount,
@JsonKey(name: "percentage") num? percentage,
});
}
/// @nodoc
class _$PaymentMethodAnalyticItemDtoCopyWithImpl<
$Res,
$Val extends PaymentMethodAnalyticItemDto
>
implements $PaymentMethodAnalyticItemDtoCopyWith<$Res> {
_$PaymentMethodAnalyticItemDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of PaymentMethodAnalyticItemDto
/// 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 int?,
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 num?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$PaymentMethodAnalyticItemDtoImplCopyWith<$Res>
implements $PaymentMethodAnalyticItemDtoCopyWith<$Res> {
factory _$$PaymentMethodAnalyticItemDtoImplCopyWith(
_$PaymentMethodAnalyticItemDtoImpl value,
$Res Function(_$PaymentMethodAnalyticItemDtoImpl) then,
) = __$$PaymentMethodAnalyticItemDtoImplCopyWithImpl<$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") int? totalAmount,
@JsonKey(name: "order_count") int? orderCount,
@JsonKey(name: "payment_count") int? paymentCount,
@JsonKey(name: "percentage") num? percentage,
});
}
/// @nodoc
class __$$PaymentMethodAnalyticItemDtoImplCopyWithImpl<$Res>
extends
_$PaymentMethodAnalyticItemDtoCopyWithImpl<
$Res,
_$PaymentMethodAnalyticItemDtoImpl
>
implements _$$PaymentMethodAnalyticItemDtoImplCopyWith<$Res> {
__$$PaymentMethodAnalyticItemDtoImplCopyWithImpl(
_$PaymentMethodAnalyticItemDtoImpl _value,
$Res Function(_$PaymentMethodAnalyticItemDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of PaymentMethodAnalyticItemDto
/// 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(
_$PaymentMethodAnalyticItemDtoImpl(
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 int?,
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 num?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$PaymentMethodAnalyticItemDtoImpl extends _PaymentMethodAnalyticItemDto {
const _$PaymentMethodAnalyticItemDtoImpl({
@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 _$PaymentMethodAnalyticItemDtoImpl.fromJson(
Map<String, dynamic> json,
) => _$$PaymentMethodAnalyticItemDtoImplFromJson(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 int? totalAmount;
@override
@JsonKey(name: "order_count")
final int? orderCount;
@override
@JsonKey(name: "payment_count")
final int? paymentCount;
@override
@JsonKey(name: "percentage")
final num? percentage;
@override
String toString() {
return 'PaymentMethodAnalyticItemDto(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 _$PaymentMethodAnalyticItemDtoImpl &&
(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 PaymentMethodAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PaymentMethodAnalyticItemDtoImplCopyWith<
_$PaymentMethodAnalyticItemDtoImpl
>
get copyWith =>
__$$PaymentMethodAnalyticItemDtoImplCopyWithImpl<
_$PaymentMethodAnalyticItemDtoImpl
>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$PaymentMethodAnalyticItemDtoImplToJson(this);
}
}
abstract class _PaymentMethodAnalyticItemDto
extends PaymentMethodAnalyticItemDto {
const factory _PaymentMethodAnalyticItemDto({
@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 int? totalAmount,
@JsonKey(name: "order_count") final int? orderCount,
@JsonKey(name: "payment_count") final int? paymentCount,
@JsonKey(name: "percentage") final num? percentage,
}) = _$PaymentMethodAnalyticItemDtoImpl;
const _PaymentMethodAnalyticItemDto._() : super._();
factory _PaymentMethodAnalyticItemDto.fromJson(Map<String, dynamic> json) =
_$PaymentMethodAnalyticItemDtoImpl.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")
int? get totalAmount;
@override
@JsonKey(name: "order_count")
int? get orderCount;
@override
@JsonKey(name: "payment_count")
int? get paymentCount;
@override
@JsonKey(name: "percentage")
num? get percentage;
/// Create a copy of PaymentMethodAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PaymentMethodAnalyticItemDtoImplCopyWith<
_$PaymentMethodAnalyticItemDtoImpl
>
get copyWith => throw _privateConstructorUsedError;
}
PaymentMethodAnalyticSummaryDto _$PaymentMethodAnalyticSummaryDtoFromJson(
Map<String, dynamic> json,
) {
return _PaymentMethodAnalyticSummaryDto.fromJson(json);
}
/// @nodoc
mixin _$PaymentMethodAnalyticSummaryDto {
@JsonKey(name: "total_amount")
int? 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 PaymentMethodAnalyticSummaryDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of PaymentMethodAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PaymentMethodAnalyticSummaryDtoCopyWith<PaymentMethodAnalyticSummaryDto>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PaymentMethodAnalyticSummaryDtoCopyWith<$Res> {
factory $PaymentMethodAnalyticSummaryDtoCopyWith(
PaymentMethodAnalyticSummaryDto value,
$Res Function(PaymentMethodAnalyticSummaryDto) then,
) =
_$PaymentMethodAnalyticSummaryDtoCopyWithImpl<
$Res,
PaymentMethodAnalyticSummaryDto
>;
@useResult
$Res call({
@JsonKey(name: "total_amount") int? totalAmount,
@JsonKey(name: "total_orders") int? totalOrders,
@JsonKey(name: "total_payments") int? totalPayments,
@JsonKey(name: "average_order_value") double? averageOrderValue,
});
}
/// @nodoc
class _$PaymentMethodAnalyticSummaryDtoCopyWithImpl<
$Res,
$Val extends PaymentMethodAnalyticSummaryDto
>
implements $PaymentMethodAnalyticSummaryDtoCopyWith<$Res> {
_$PaymentMethodAnalyticSummaryDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of PaymentMethodAnalyticSummaryDto
/// 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 int?,
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 _$$PaymentMethodAnalyticSummaryDtoImplCopyWith<$Res>
implements $PaymentMethodAnalyticSummaryDtoCopyWith<$Res> {
factory _$$PaymentMethodAnalyticSummaryDtoImplCopyWith(
_$PaymentMethodAnalyticSummaryDtoImpl value,
$Res Function(_$PaymentMethodAnalyticSummaryDtoImpl) then,
) = __$$PaymentMethodAnalyticSummaryDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "total_amount") int? totalAmount,
@JsonKey(name: "total_orders") int? totalOrders,
@JsonKey(name: "total_payments") int? totalPayments,
@JsonKey(name: "average_order_value") double? averageOrderValue,
});
}
/// @nodoc
class __$$PaymentMethodAnalyticSummaryDtoImplCopyWithImpl<$Res>
extends
_$PaymentMethodAnalyticSummaryDtoCopyWithImpl<
$Res,
_$PaymentMethodAnalyticSummaryDtoImpl
>
implements _$$PaymentMethodAnalyticSummaryDtoImplCopyWith<$Res> {
__$$PaymentMethodAnalyticSummaryDtoImplCopyWithImpl(
_$PaymentMethodAnalyticSummaryDtoImpl _value,
$Res Function(_$PaymentMethodAnalyticSummaryDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of PaymentMethodAnalyticSummaryDto
/// 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(
_$PaymentMethodAnalyticSummaryDtoImpl(
totalAmount: freezed == totalAmount
? _value.totalAmount
: totalAmount // ignore: cast_nullable_to_non_nullable
as int?,
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 _$PaymentMethodAnalyticSummaryDtoImpl
extends _PaymentMethodAnalyticSummaryDto {
const _$PaymentMethodAnalyticSummaryDtoImpl({
@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 _$PaymentMethodAnalyticSummaryDtoImpl.fromJson(
Map<String, dynamic> json,
) => _$$PaymentMethodAnalyticSummaryDtoImplFromJson(json);
@override
@JsonKey(name: "total_amount")
final int? 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 'PaymentMethodAnalyticSummaryDto(totalAmount: $totalAmount, totalOrders: $totalOrders, totalPayments: $totalPayments, averageOrderValue: $averageOrderValue)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$PaymentMethodAnalyticSummaryDtoImpl &&
(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 PaymentMethodAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PaymentMethodAnalyticSummaryDtoImplCopyWith<
_$PaymentMethodAnalyticSummaryDtoImpl
>
get copyWith =>
__$$PaymentMethodAnalyticSummaryDtoImplCopyWithImpl<
_$PaymentMethodAnalyticSummaryDtoImpl
>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$PaymentMethodAnalyticSummaryDtoImplToJson(this);
}
}
abstract class _PaymentMethodAnalyticSummaryDto
extends PaymentMethodAnalyticSummaryDto {
const factory _PaymentMethodAnalyticSummaryDto({
@JsonKey(name: "total_amount") final int? totalAmount,
@JsonKey(name: "total_orders") final int? totalOrders,
@JsonKey(name: "total_payments") final int? totalPayments,
@JsonKey(name: "average_order_value") final double? averageOrderValue,
}) = _$PaymentMethodAnalyticSummaryDtoImpl;
const _PaymentMethodAnalyticSummaryDto._() : super._();
factory _PaymentMethodAnalyticSummaryDto.fromJson(Map<String, dynamic> json) =
_$PaymentMethodAnalyticSummaryDtoImpl.fromJson;
@override
@JsonKey(name: "total_amount")
int? 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 PaymentMethodAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PaymentMethodAnalyticSummaryDtoImplCopyWith<
_$PaymentMethodAnalyticSummaryDtoImpl
>
get copyWith => throw _privateConstructorUsedError;
}
2025-11-03 21:28:36 +07:00
ProfitLossAnalyticDto _$ProfitLossAnalyticDtoFromJson(
Map<String, dynamic> json,
) {
return _ProfitLossAnalyticDto.fromJson(json);
}
/// @nodoc
mixin _$ProfitLossAnalyticDto {
@JsonKey(name: "organization_id")
String? get organizationId => 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")
ProfitLossAnalyticSummaryDto? get summary =>
throw _privateConstructorUsedError;
@JsonKey(name: "data")
List<ProfitLossAnalyticItemDto>? get data =>
throw _privateConstructorUsedError;
@JsonKey(name: "product_data")
List<ProfitLossAnalyticProductDto>? get productData =>
throw _privateConstructorUsedError;
/// Serializes this ProfitLossAnalyticDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of ProfitLossAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProfitLossAnalyticDtoCopyWith<ProfitLossAnalyticDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProfitLossAnalyticDtoCopyWith<$Res> {
factory $ProfitLossAnalyticDtoCopyWith(
ProfitLossAnalyticDto value,
$Res Function(ProfitLossAnalyticDto) then,
) = _$ProfitLossAnalyticDtoCopyWithImpl<$Res, ProfitLossAnalyticDto>;
@useResult
$Res call({
@JsonKey(name: "organization_id") String? organizationId,
@JsonKey(name: "date_from") String? dateFrom,
@JsonKey(name: "date_to") String? dateTo,
@JsonKey(name: "group_by") String? groupBy,
@JsonKey(name: "summary") ProfitLossAnalyticSummaryDto? summary,
@JsonKey(name: "data") List<ProfitLossAnalyticItemDto>? data,
@JsonKey(name: "product_data")
List<ProfitLossAnalyticProductDto>? productData,
});
$ProfitLossAnalyticSummaryDtoCopyWith<$Res>? get summary;
}
/// @nodoc
class _$ProfitLossAnalyticDtoCopyWithImpl<
$Res,
$Val extends ProfitLossAnalyticDto
>
implements $ProfitLossAnalyticDtoCopyWith<$Res> {
_$ProfitLossAnalyticDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ProfitLossAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? organizationId = freezed,
Object? dateFrom = freezed,
Object? dateTo = freezed,
Object? groupBy = freezed,
Object? summary = freezed,
Object? data = freezed,
Object? productData = freezed,
}) {
return _then(
_value.copyWith(
organizationId: freezed == organizationId
? _value.organizationId
: organizationId // 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 ProfitLossAnalyticSummaryDto?,
data: freezed == data
? _value.data
: data // ignore: cast_nullable_to_non_nullable
as List<ProfitLossAnalyticItemDto>?,
productData: freezed == productData
? _value.productData
: productData // ignore: cast_nullable_to_non_nullable
as List<ProfitLossAnalyticProductDto>?,
)
as $Val,
);
}
/// Create a copy of ProfitLossAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ProfitLossAnalyticSummaryDtoCopyWith<$Res>? get summary {
if (_value.summary == null) {
return null;
}
return $ProfitLossAnalyticSummaryDtoCopyWith<$Res>(_value.summary!, (
value,
) {
return _then(_value.copyWith(summary: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$ProfitLossAnalyticDtoImplCopyWith<$Res>
implements $ProfitLossAnalyticDtoCopyWith<$Res> {
factory _$$ProfitLossAnalyticDtoImplCopyWith(
_$ProfitLossAnalyticDtoImpl value,
$Res Function(_$ProfitLossAnalyticDtoImpl) then,
) = __$$ProfitLossAnalyticDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "organization_id") String? organizationId,
@JsonKey(name: "date_from") String? dateFrom,
@JsonKey(name: "date_to") String? dateTo,
@JsonKey(name: "group_by") String? groupBy,
@JsonKey(name: "summary") ProfitLossAnalyticSummaryDto? summary,
@JsonKey(name: "data") List<ProfitLossAnalyticItemDto>? data,
@JsonKey(name: "product_data")
List<ProfitLossAnalyticProductDto>? productData,
});
@override
$ProfitLossAnalyticSummaryDtoCopyWith<$Res>? get summary;
}
/// @nodoc
class __$$ProfitLossAnalyticDtoImplCopyWithImpl<$Res>
extends
_$ProfitLossAnalyticDtoCopyWithImpl<$Res, _$ProfitLossAnalyticDtoImpl>
implements _$$ProfitLossAnalyticDtoImplCopyWith<$Res> {
__$$ProfitLossAnalyticDtoImplCopyWithImpl(
_$ProfitLossAnalyticDtoImpl _value,
$Res Function(_$ProfitLossAnalyticDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of ProfitLossAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? organizationId = freezed,
Object? dateFrom = freezed,
Object? dateTo = freezed,
Object? groupBy = freezed,
Object? summary = freezed,
Object? data = freezed,
Object? productData = freezed,
}) {
return _then(
_$ProfitLossAnalyticDtoImpl(
organizationId: freezed == organizationId
? _value.organizationId
: organizationId // 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 ProfitLossAnalyticSummaryDto?,
data: freezed == data
? _value._data
: data // ignore: cast_nullable_to_non_nullable
as List<ProfitLossAnalyticItemDto>?,
productData: freezed == productData
? _value._productData
: productData // ignore: cast_nullable_to_non_nullable
as List<ProfitLossAnalyticProductDto>?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$ProfitLossAnalyticDtoImpl extends _ProfitLossAnalyticDto {
const _$ProfitLossAnalyticDtoImpl({
@JsonKey(name: "organization_id") this.organizationId,
@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<ProfitLossAnalyticItemDto>? data,
@JsonKey(name: "product_data")
final List<ProfitLossAnalyticProductDto>? productData,
}) : _data = data,
_productData = productData,
super._();
factory _$ProfitLossAnalyticDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$ProfitLossAnalyticDtoImplFromJson(json);
@override
@JsonKey(name: "organization_id")
final String? organizationId;
@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 ProfitLossAnalyticSummaryDto? summary;
final List<ProfitLossAnalyticItemDto>? _data;
@override
@JsonKey(name: "data")
List<ProfitLossAnalyticItemDto>? get data {
final value = _data;
if (value == null) return null;
if (_data is EqualUnmodifiableListView) return _data;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
final List<ProfitLossAnalyticProductDto>? _productData;
@override
@JsonKey(name: "product_data")
List<ProfitLossAnalyticProductDto>? get productData {
final value = _productData;
if (value == null) return null;
if (_productData is EqualUnmodifiableListView) return _productData;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override
String toString() {
return 'ProfitLossAnalyticDto(organizationId: $organizationId, dateFrom: $dateFrom, dateTo: $dateTo, groupBy: $groupBy, summary: $summary, data: $data, productData: $productData)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfitLossAnalyticDtoImpl &&
(identical(other.organizationId, organizationId) ||
other.organizationId == organizationId) &&
(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) &&
const DeepCollectionEquality().equals(
other._productData,
_productData,
));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
organizationId,
dateFrom,
dateTo,
groupBy,
summary,
const DeepCollectionEquality().hash(_data),
const DeepCollectionEquality().hash(_productData),
);
/// Create a copy of ProfitLossAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProfitLossAnalyticDtoImplCopyWith<_$ProfitLossAnalyticDtoImpl>
get copyWith =>
__$$ProfitLossAnalyticDtoImplCopyWithImpl<_$ProfitLossAnalyticDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$ProfitLossAnalyticDtoImplToJson(this);
}
}
abstract class _ProfitLossAnalyticDto extends ProfitLossAnalyticDto {
const factory _ProfitLossAnalyticDto({
@JsonKey(name: "organization_id") final String? organizationId,
@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 ProfitLossAnalyticSummaryDto? summary,
@JsonKey(name: "data") final List<ProfitLossAnalyticItemDto>? data,
@JsonKey(name: "product_data")
final List<ProfitLossAnalyticProductDto>? productData,
}) = _$ProfitLossAnalyticDtoImpl;
const _ProfitLossAnalyticDto._() : super._();
factory _ProfitLossAnalyticDto.fromJson(Map<String, dynamic> json) =
_$ProfitLossAnalyticDtoImpl.fromJson;
@override
@JsonKey(name: "organization_id")
String? get organizationId;
@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")
ProfitLossAnalyticSummaryDto? get summary;
@override
@JsonKey(name: "data")
List<ProfitLossAnalyticItemDto>? get data;
@override
@JsonKey(name: "product_data")
List<ProfitLossAnalyticProductDto>? get productData;
/// Create a copy of ProfitLossAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfitLossAnalyticDtoImplCopyWith<_$ProfitLossAnalyticDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}
ProfitLossAnalyticSummaryDto _$ProfitLossAnalyticSummaryDtoFromJson(
Map<String, dynamic> json,
) {
return _ProfitLossAnalyticSummaryDto.fromJson(json);
}
/// @nodoc
mixin _$ProfitLossAnalyticSummaryDto {
@JsonKey(name: "total_revenue")
int? get totalRevenue => throw _privateConstructorUsedError;
@JsonKey(name: "total_cost")
num? get totalCost => throw _privateConstructorUsedError;
@JsonKey(name: "gross_profit")
num? get grossProfit => throw _privateConstructorUsedError;
@JsonKey(name: "gross_profit_margin")
double? get grossProfitMargin => throw _privateConstructorUsedError;
@JsonKey(name: "total_tax")
int? get totalTax => throw _privateConstructorUsedError;
@JsonKey(name: "total_discount")
int? get totalDiscount => throw _privateConstructorUsedError;
@JsonKey(name: "net_profit")
num? get netProfit => throw _privateConstructorUsedError;
@JsonKey(name: "net_profit_margin")
double? get netProfitMargin => throw _privateConstructorUsedError;
@JsonKey(name: "total_orders")
int? get totalOrders => throw _privateConstructorUsedError;
@JsonKey(name: "average_profit")
double? get averageProfit => throw _privateConstructorUsedError;
@JsonKey(name: "profitability_ratio")
double? get profitabilityRatio => throw _privateConstructorUsedError;
/// Serializes this ProfitLossAnalyticSummaryDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of ProfitLossAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProfitLossAnalyticSummaryDtoCopyWith<ProfitLossAnalyticSummaryDto>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProfitLossAnalyticSummaryDtoCopyWith<$Res> {
factory $ProfitLossAnalyticSummaryDtoCopyWith(
ProfitLossAnalyticSummaryDto value,
$Res Function(ProfitLossAnalyticSummaryDto) then,
) =
_$ProfitLossAnalyticSummaryDtoCopyWithImpl<
$Res,
ProfitLossAnalyticSummaryDto
>;
@useResult
$Res call({
@JsonKey(name: "total_revenue") int? totalRevenue,
@JsonKey(name: "total_cost") num? totalCost,
@JsonKey(name: "gross_profit") num? grossProfit,
@JsonKey(name: "gross_profit_margin") double? grossProfitMargin,
@JsonKey(name: "total_tax") int? totalTax,
@JsonKey(name: "total_discount") int? totalDiscount,
@JsonKey(name: "net_profit") num? netProfit,
@JsonKey(name: "net_profit_margin") double? netProfitMargin,
@JsonKey(name: "total_orders") int? totalOrders,
@JsonKey(name: "average_profit") double? averageProfit,
@JsonKey(name: "profitability_ratio") double? profitabilityRatio,
});
}
/// @nodoc
class _$ProfitLossAnalyticSummaryDtoCopyWithImpl<
$Res,
$Val extends ProfitLossAnalyticSummaryDto
>
implements $ProfitLossAnalyticSummaryDtoCopyWith<$Res> {
_$ProfitLossAnalyticSummaryDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ProfitLossAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? totalRevenue = freezed,
Object? totalCost = freezed,
Object? grossProfit = freezed,
Object? grossProfitMargin = freezed,
Object? totalTax = freezed,
Object? totalDiscount = freezed,
Object? netProfit = freezed,
Object? netProfitMargin = freezed,
Object? totalOrders = freezed,
Object? averageProfit = freezed,
Object? profitabilityRatio = freezed,
}) {
return _then(
_value.copyWith(
totalRevenue: freezed == totalRevenue
? _value.totalRevenue
: totalRevenue // ignore: cast_nullable_to_non_nullable
as int?,
totalCost: freezed == totalCost
? _value.totalCost
: totalCost // ignore: cast_nullable_to_non_nullable
as num?,
grossProfit: freezed == grossProfit
? _value.grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as num?,
grossProfitMargin: freezed == grossProfitMargin
? _value.grossProfitMargin
: grossProfitMargin // ignore: cast_nullable_to_non_nullable
as double?,
totalTax: freezed == totalTax
? _value.totalTax
: totalTax // ignore: cast_nullable_to_non_nullable
as int?,
totalDiscount: freezed == totalDiscount
? _value.totalDiscount
: totalDiscount // ignore: cast_nullable_to_non_nullable
as int?,
netProfit: freezed == netProfit
? _value.netProfit
: netProfit // ignore: cast_nullable_to_non_nullable
as num?,
netProfitMargin: freezed == netProfitMargin
? _value.netProfitMargin
: netProfitMargin // ignore: cast_nullable_to_non_nullable
as double?,
totalOrders: freezed == totalOrders
? _value.totalOrders
: totalOrders // ignore: cast_nullable_to_non_nullable
as int?,
averageProfit: freezed == averageProfit
? _value.averageProfit
: averageProfit // ignore: cast_nullable_to_non_nullable
as double?,
profitabilityRatio: freezed == profitabilityRatio
? _value.profitabilityRatio
: profitabilityRatio // ignore: cast_nullable_to_non_nullable
as double?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$ProfitLossAnalyticSummaryDtoImplCopyWith<$Res>
implements $ProfitLossAnalyticSummaryDtoCopyWith<$Res> {
factory _$$ProfitLossAnalyticSummaryDtoImplCopyWith(
_$ProfitLossAnalyticSummaryDtoImpl value,
$Res Function(_$ProfitLossAnalyticSummaryDtoImpl) then,
) = __$$ProfitLossAnalyticSummaryDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "total_revenue") int? totalRevenue,
@JsonKey(name: "total_cost") num? totalCost,
@JsonKey(name: "gross_profit") num? grossProfit,
@JsonKey(name: "gross_profit_margin") double? grossProfitMargin,
@JsonKey(name: "total_tax") int? totalTax,
@JsonKey(name: "total_discount") int? totalDiscount,
@JsonKey(name: "net_profit") num? netProfit,
@JsonKey(name: "net_profit_margin") double? netProfitMargin,
@JsonKey(name: "total_orders") int? totalOrders,
@JsonKey(name: "average_profit") double? averageProfit,
@JsonKey(name: "profitability_ratio") double? profitabilityRatio,
});
}
/// @nodoc
class __$$ProfitLossAnalyticSummaryDtoImplCopyWithImpl<$Res>
extends
_$ProfitLossAnalyticSummaryDtoCopyWithImpl<
$Res,
_$ProfitLossAnalyticSummaryDtoImpl
>
implements _$$ProfitLossAnalyticSummaryDtoImplCopyWith<$Res> {
__$$ProfitLossAnalyticSummaryDtoImplCopyWithImpl(
_$ProfitLossAnalyticSummaryDtoImpl _value,
$Res Function(_$ProfitLossAnalyticSummaryDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of ProfitLossAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? totalRevenue = freezed,
Object? totalCost = freezed,
Object? grossProfit = freezed,
Object? grossProfitMargin = freezed,
Object? totalTax = freezed,
Object? totalDiscount = freezed,
Object? netProfit = freezed,
Object? netProfitMargin = freezed,
Object? totalOrders = freezed,
Object? averageProfit = freezed,
Object? profitabilityRatio = freezed,
}) {
return _then(
_$ProfitLossAnalyticSummaryDtoImpl(
totalRevenue: freezed == totalRevenue
? _value.totalRevenue
: totalRevenue // ignore: cast_nullable_to_non_nullable
as int?,
totalCost: freezed == totalCost
? _value.totalCost
: totalCost // ignore: cast_nullable_to_non_nullable
as num?,
grossProfit: freezed == grossProfit
? _value.grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as num?,
grossProfitMargin: freezed == grossProfitMargin
? _value.grossProfitMargin
: grossProfitMargin // ignore: cast_nullable_to_non_nullable
as double?,
totalTax: freezed == totalTax
? _value.totalTax
: totalTax // ignore: cast_nullable_to_non_nullable
as int?,
totalDiscount: freezed == totalDiscount
? _value.totalDiscount
: totalDiscount // ignore: cast_nullable_to_non_nullable
as int?,
netProfit: freezed == netProfit
? _value.netProfit
: netProfit // ignore: cast_nullable_to_non_nullable
as num?,
netProfitMargin: freezed == netProfitMargin
? _value.netProfitMargin
: netProfitMargin // ignore: cast_nullable_to_non_nullable
as double?,
totalOrders: freezed == totalOrders
? _value.totalOrders
: totalOrders // ignore: cast_nullable_to_non_nullable
as int?,
averageProfit: freezed == averageProfit
? _value.averageProfit
: averageProfit // ignore: cast_nullable_to_non_nullable
as double?,
profitabilityRatio: freezed == profitabilityRatio
? _value.profitabilityRatio
: profitabilityRatio // ignore: cast_nullable_to_non_nullable
as double?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$ProfitLossAnalyticSummaryDtoImpl extends _ProfitLossAnalyticSummaryDto {
const _$ProfitLossAnalyticSummaryDtoImpl({
@JsonKey(name: "total_revenue") this.totalRevenue,
@JsonKey(name: "total_cost") this.totalCost,
@JsonKey(name: "gross_profit") this.grossProfit,
@JsonKey(name: "gross_profit_margin") this.grossProfitMargin,
@JsonKey(name: "total_tax") this.totalTax,
@JsonKey(name: "total_discount") this.totalDiscount,
@JsonKey(name: "net_profit") this.netProfit,
@JsonKey(name: "net_profit_margin") this.netProfitMargin,
@JsonKey(name: "total_orders") this.totalOrders,
@JsonKey(name: "average_profit") this.averageProfit,
@JsonKey(name: "profitability_ratio") this.profitabilityRatio,
}) : super._();
factory _$ProfitLossAnalyticSummaryDtoImpl.fromJson(
Map<String, dynamic> json,
) => _$$ProfitLossAnalyticSummaryDtoImplFromJson(json);
@override
@JsonKey(name: "total_revenue")
final int? totalRevenue;
@override
@JsonKey(name: "total_cost")
final num? totalCost;
@override
@JsonKey(name: "gross_profit")
final num? grossProfit;
@override
@JsonKey(name: "gross_profit_margin")
final double? grossProfitMargin;
@override
@JsonKey(name: "total_tax")
final int? totalTax;
@override
@JsonKey(name: "total_discount")
final int? totalDiscount;
@override
@JsonKey(name: "net_profit")
final num? netProfit;
@override
@JsonKey(name: "net_profit_margin")
final double? netProfitMargin;
@override
@JsonKey(name: "total_orders")
final int? totalOrders;
@override
@JsonKey(name: "average_profit")
final double? averageProfit;
@override
@JsonKey(name: "profitability_ratio")
final double? profitabilityRatio;
@override
String toString() {
return 'ProfitLossAnalyticSummaryDto(totalRevenue: $totalRevenue, totalCost: $totalCost, grossProfit: $grossProfit, grossProfitMargin: $grossProfitMargin, totalTax: $totalTax, totalDiscount: $totalDiscount, netProfit: $netProfit, netProfitMargin: $netProfitMargin, totalOrders: $totalOrders, averageProfit: $averageProfit, profitabilityRatio: $profitabilityRatio)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfitLossAnalyticSummaryDtoImpl &&
(identical(other.totalRevenue, totalRevenue) ||
other.totalRevenue == totalRevenue) &&
(identical(other.totalCost, totalCost) ||
other.totalCost == totalCost) &&
(identical(other.grossProfit, grossProfit) ||
other.grossProfit == grossProfit) &&
(identical(other.grossProfitMargin, grossProfitMargin) ||
other.grossProfitMargin == grossProfitMargin) &&
(identical(other.totalTax, totalTax) ||
other.totalTax == totalTax) &&
(identical(other.totalDiscount, totalDiscount) ||
other.totalDiscount == totalDiscount) &&
(identical(other.netProfit, netProfit) ||
other.netProfit == netProfit) &&
(identical(other.netProfitMargin, netProfitMargin) ||
other.netProfitMargin == netProfitMargin) &&
(identical(other.totalOrders, totalOrders) ||
other.totalOrders == totalOrders) &&
(identical(other.averageProfit, averageProfit) ||
other.averageProfit == averageProfit) &&
(identical(other.profitabilityRatio, profitabilityRatio) ||
other.profitabilityRatio == profitabilityRatio));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
totalRevenue,
totalCost,
grossProfit,
grossProfitMargin,
totalTax,
totalDiscount,
netProfit,
netProfitMargin,
totalOrders,
averageProfit,
profitabilityRatio,
);
/// Create a copy of ProfitLossAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProfitLossAnalyticSummaryDtoImplCopyWith<
_$ProfitLossAnalyticSummaryDtoImpl
>
get copyWith =>
__$$ProfitLossAnalyticSummaryDtoImplCopyWithImpl<
_$ProfitLossAnalyticSummaryDtoImpl
>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$ProfitLossAnalyticSummaryDtoImplToJson(this);
}
}
abstract class _ProfitLossAnalyticSummaryDto
extends ProfitLossAnalyticSummaryDto {
const factory _ProfitLossAnalyticSummaryDto({
@JsonKey(name: "total_revenue") final int? totalRevenue,
@JsonKey(name: "total_cost") final num? totalCost,
@JsonKey(name: "gross_profit") final num? grossProfit,
@JsonKey(name: "gross_profit_margin") final double? grossProfitMargin,
@JsonKey(name: "total_tax") final int? totalTax,
@JsonKey(name: "total_discount") final int? totalDiscount,
@JsonKey(name: "net_profit") final num? netProfit,
@JsonKey(name: "net_profit_margin") final double? netProfitMargin,
@JsonKey(name: "total_orders") final int? totalOrders,
@JsonKey(name: "average_profit") final double? averageProfit,
@JsonKey(name: "profitability_ratio") final double? profitabilityRatio,
}) = _$ProfitLossAnalyticSummaryDtoImpl;
const _ProfitLossAnalyticSummaryDto._() : super._();
factory _ProfitLossAnalyticSummaryDto.fromJson(Map<String, dynamic> json) =
_$ProfitLossAnalyticSummaryDtoImpl.fromJson;
@override
@JsonKey(name: "total_revenue")
int? get totalRevenue;
@override
@JsonKey(name: "total_cost")
num? get totalCost;
@override
@JsonKey(name: "gross_profit")
num? get grossProfit;
@override
@JsonKey(name: "gross_profit_margin")
double? get grossProfitMargin;
@override
@JsonKey(name: "total_tax")
int? get totalTax;
@override
@JsonKey(name: "total_discount")
int? get totalDiscount;
@override
@JsonKey(name: "net_profit")
num? get netProfit;
@override
@JsonKey(name: "net_profit_margin")
double? get netProfitMargin;
@override
@JsonKey(name: "total_orders")
int? get totalOrders;
@override
@JsonKey(name: "average_profit")
double? get averageProfit;
@override
@JsonKey(name: "profitability_ratio")
double? get profitabilityRatio;
/// Create a copy of ProfitLossAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfitLossAnalyticSummaryDtoImplCopyWith<
_$ProfitLossAnalyticSummaryDtoImpl
>
get copyWith => throw _privateConstructorUsedError;
}
ProfitLossAnalyticItemDto _$ProfitLossAnalyticItemDtoFromJson(
Map<String, dynamic> json,
) {
return _ProfitLossAnalyticItemDto.fromJson(json);
}
/// @nodoc
mixin _$ProfitLossAnalyticItemDto {
@JsonKey(name: "date")
String? get date => throw _privateConstructorUsedError;
@JsonKey(name: "revenue")
int? get revenue => throw _privateConstructorUsedError;
@JsonKey(name: "cost")
num? get cost => throw _privateConstructorUsedError;
@JsonKey(name: "gross_profit")
num? get grossProfit => throw _privateConstructorUsedError;
@JsonKey(name: "gross_profit_margin")
double? get grossProfitMargin => throw _privateConstructorUsedError;
@JsonKey(name: "tax")
int? get tax => throw _privateConstructorUsedError;
@JsonKey(name: "discount")
int? get discount => throw _privateConstructorUsedError;
@JsonKey(name: "net_profit")
num? get netProfit => throw _privateConstructorUsedError;
@JsonKey(name: "net_profit_margin")
double? get netProfitMargin => throw _privateConstructorUsedError;
@JsonKey(name: "orders")
int? get orders => throw _privateConstructorUsedError;
/// Serializes this ProfitLossAnalyticItemDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of ProfitLossAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProfitLossAnalyticItemDtoCopyWith<ProfitLossAnalyticItemDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProfitLossAnalyticItemDtoCopyWith<$Res> {
factory $ProfitLossAnalyticItemDtoCopyWith(
ProfitLossAnalyticItemDto value,
$Res Function(ProfitLossAnalyticItemDto) then,
) = _$ProfitLossAnalyticItemDtoCopyWithImpl<$Res, ProfitLossAnalyticItemDto>;
@useResult
$Res call({
@JsonKey(name: "date") String? date,
@JsonKey(name: "revenue") int? revenue,
@JsonKey(name: "cost") num? cost,
@JsonKey(name: "gross_profit") num? grossProfit,
@JsonKey(name: "gross_profit_margin") double? grossProfitMargin,
@JsonKey(name: "tax") int? tax,
@JsonKey(name: "discount") int? discount,
@JsonKey(name: "net_profit") num? netProfit,
@JsonKey(name: "net_profit_margin") double? netProfitMargin,
@JsonKey(name: "orders") int? orders,
});
}
/// @nodoc
class _$ProfitLossAnalyticItemDtoCopyWithImpl<
$Res,
$Val extends ProfitLossAnalyticItemDto
>
implements $ProfitLossAnalyticItemDtoCopyWith<$Res> {
_$ProfitLossAnalyticItemDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ProfitLossAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? date = freezed,
Object? revenue = freezed,
Object? cost = freezed,
Object? grossProfit = freezed,
Object? grossProfitMargin = freezed,
Object? tax = freezed,
Object? discount = freezed,
Object? netProfit = freezed,
Object? netProfitMargin = freezed,
Object? orders = freezed,
}) {
return _then(
_value.copyWith(
date: freezed == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as String?,
revenue: freezed == revenue
? _value.revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int?,
cost: freezed == cost
? _value.cost
: cost // ignore: cast_nullable_to_non_nullable
as num?,
grossProfit: freezed == grossProfit
? _value.grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as num?,
grossProfitMargin: freezed == grossProfitMargin
? _value.grossProfitMargin
: grossProfitMargin // ignore: cast_nullable_to_non_nullable
as double?,
tax: freezed == tax
? _value.tax
: tax // ignore: cast_nullable_to_non_nullable
as int?,
discount: freezed == discount
? _value.discount
: discount // ignore: cast_nullable_to_non_nullable
as int?,
netProfit: freezed == netProfit
? _value.netProfit
: netProfit // ignore: cast_nullable_to_non_nullable
as num?,
netProfitMargin: freezed == netProfitMargin
? _value.netProfitMargin
: netProfitMargin // ignore: cast_nullable_to_non_nullable
as double?,
orders: freezed == orders
? _value.orders
: orders // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$ProfitLossAnalyticItemDtoImplCopyWith<$Res>
implements $ProfitLossAnalyticItemDtoCopyWith<$Res> {
factory _$$ProfitLossAnalyticItemDtoImplCopyWith(
_$ProfitLossAnalyticItemDtoImpl value,
$Res Function(_$ProfitLossAnalyticItemDtoImpl) then,
) = __$$ProfitLossAnalyticItemDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "date") String? date,
@JsonKey(name: "revenue") int? revenue,
@JsonKey(name: "cost") num? cost,
@JsonKey(name: "gross_profit") num? grossProfit,
@JsonKey(name: "gross_profit_margin") double? grossProfitMargin,
@JsonKey(name: "tax") int? tax,
@JsonKey(name: "discount") int? discount,
@JsonKey(name: "net_profit") num? netProfit,
@JsonKey(name: "net_profit_margin") double? netProfitMargin,
@JsonKey(name: "orders") int? orders,
});
}
/// @nodoc
class __$$ProfitLossAnalyticItemDtoImplCopyWithImpl<$Res>
extends
_$ProfitLossAnalyticItemDtoCopyWithImpl<
$Res,
_$ProfitLossAnalyticItemDtoImpl
>
implements _$$ProfitLossAnalyticItemDtoImplCopyWith<$Res> {
__$$ProfitLossAnalyticItemDtoImplCopyWithImpl(
_$ProfitLossAnalyticItemDtoImpl _value,
$Res Function(_$ProfitLossAnalyticItemDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of ProfitLossAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? date = freezed,
Object? revenue = freezed,
Object? cost = freezed,
Object? grossProfit = freezed,
Object? grossProfitMargin = freezed,
Object? tax = freezed,
Object? discount = freezed,
Object? netProfit = freezed,
Object? netProfitMargin = freezed,
Object? orders = freezed,
}) {
return _then(
_$ProfitLossAnalyticItemDtoImpl(
date: freezed == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as String?,
revenue: freezed == revenue
? _value.revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int?,
cost: freezed == cost
? _value.cost
: cost // ignore: cast_nullable_to_non_nullable
as num?,
grossProfit: freezed == grossProfit
? _value.grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as num?,
grossProfitMargin: freezed == grossProfitMargin
? _value.grossProfitMargin
: grossProfitMargin // ignore: cast_nullable_to_non_nullable
as double?,
tax: freezed == tax
? _value.tax
: tax // ignore: cast_nullable_to_non_nullable
as int?,
discount: freezed == discount
? _value.discount
: discount // ignore: cast_nullable_to_non_nullable
as int?,
netProfit: freezed == netProfit
? _value.netProfit
: netProfit // ignore: cast_nullable_to_non_nullable
as num?,
netProfitMargin: freezed == netProfitMargin
? _value.netProfitMargin
: netProfitMargin // ignore: cast_nullable_to_non_nullable
as double?,
orders: freezed == orders
? _value.orders
: orders // ignore: cast_nullable_to_non_nullable
as int?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$ProfitLossAnalyticItemDtoImpl extends _ProfitLossAnalyticItemDto {
const _$ProfitLossAnalyticItemDtoImpl({
@JsonKey(name: "date") this.date,
@JsonKey(name: "revenue") this.revenue,
@JsonKey(name: "cost") this.cost,
@JsonKey(name: "gross_profit") this.grossProfit,
@JsonKey(name: "gross_profit_margin") this.grossProfitMargin,
@JsonKey(name: "tax") this.tax,
@JsonKey(name: "discount") this.discount,
@JsonKey(name: "net_profit") this.netProfit,
@JsonKey(name: "net_profit_margin") this.netProfitMargin,
@JsonKey(name: "orders") this.orders,
}) : super._();
factory _$ProfitLossAnalyticItemDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$ProfitLossAnalyticItemDtoImplFromJson(json);
@override
@JsonKey(name: "date")
final String? date;
@override
@JsonKey(name: "revenue")
final int? revenue;
@override
@JsonKey(name: "cost")
final num? cost;
@override
@JsonKey(name: "gross_profit")
final num? grossProfit;
@override
@JsonKey(name: "gross_profit_margin")
final double? grossProfitMargin;
@override
@JsonKey(name: "tax")
final int? tax;
@override
@JsonKey(name: "discount")
final int? discount;
@override
@JsonKey(name: "net_profit")
final num? netProfit;
@override
@JsonKey(name: "net_profit_margin")
final double? netProfitMargin;
@override
@JsonKey(name: "orders")
final int? orders;
@override
String toString() {
return 'ProfitLossAnalyticItemDto(date: $date, revenue: $revenue, cost: $cost, grossProfit: $grossProfit, grossProfitMargin: $grossProfitMargin, tax: $tax, discount: $discount, netProfit: $netProfit, netProfitMargin: $netProfitMargin, orders: $orders)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfitLossAnalyticItemDtoImpl &&
(identical(other.date, date) || other.date == date) &&
(identical(other.revenue, revenue) || other.revenue == revenue) &&
(identical(other.cost, cost) || other.cost == cost) &&
(identical(other.grossProfit, grossProfit) ||
other.grossProfit == grossProfit) &&
(identical(other.grossProfitMargin, grossProfitMargin) ||
other.grossProfitMargin == grossProfitMargin) &&
(identical(other.tax, tax) || other.tax == tax) &&
(identical(other.discount, discount) ||
other.discount == discount) &&
(identical(other.netProfit, netProfit) ||
other.netProfit == netProfit) &&
(identical(other.netProfitMargin, netProfitMargin) ||
other.netProfitMargin == netProfitMargin) &&
(identical(other.orders, orders) || other.orders == orders));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
date,
revenue,
cost,
grossProfit,
grossProfitMargin,
tax,
discount,
netProfit,
netProfitMargin,
orders,
);
/// Create a copy of ProfitLossAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProfitLossAnalyticItemDtoImplCopyWith<_$ProfitLossAnalyticItemDtoImpl>
get copyWith =>
__$$ProfitLossAnalyticItemDtoImplCopyWithImpl<
_$ProfitLossAnalyticItemDtoImpl
>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$ProfitLossAnalyticItemDtoImplToJson(this);
}
}
abstract class _ProfitLossAnalyticItemDto extends ProfitLossAnalyticItemDto {
const factory _ProfitLossAnalyticItemDto({
@JsonKey(name: "date") final String? date,
@JsonKey(name: "revenue") final int? revenue,
@JsonKey(name: "cost") final num? cost,
@JsonKey(name: "gross_profit") final num? grossProfit,
@JsonKey(name: "gross_profit_margin") final double? grossProfitMargin,
@JsonKey(name: "tax") final int? tax,
@JsonKey(name: "discount") final int? discount,
@JsonKey(name: "net_profit") final num? netProfit,
@JsonKey(name: "net_profit_margin") final double? netProfitMargin,
@JsonKey(name: "orders") final int? orders,
}) = _$ProfitLossAnalyticItemDtoImpl;
const _ProfitLossAnalyticItemDto._() : super._();
factory _ProfitLossAnalyticItemDto.fromJson(Map<String, dynamic> json) =
_$ProfitLossAnalyticItemDtoImpl.fromJson;
@override
@JsonKey(name: "date")
String? get date;
@override
@JsonKey(name: "revenue")
int? get revenue;
@override
@JsonKey(name: "cost")
num? get cost;
@override
@JsonKey(name: "gross_profit")
num? get grossProfit;
@override
@JsonKey(name: "gross_profit_margin")
double? get grossProfitMargin;
@override
@JsonKey(name: "tax")
int? get tax;
@override
@JsonKey(name: "discount")
int? get discount;
@override
@JsonKey(name: "net_profit")
num? get netProfit;
@override
@JsonKey(name: "net_profit_margin")
double? get netProfitMargin;
@override
@JsonKey(name: "orders")
int? get orders;
/// Create a copy of ProfitLossAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfitLossAnalyticItemDtoImplCopyWith<_$ProfitLossAnalyticItemDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}
ProfitLossAnalyticProductDto _$ProfitLossAnalyticProductDtoFromJson(
Map<String, dynamic> json,
) {
return _ProfitLossAnalyticProductDto.fromJson(json);
}
/// @nodoc
mixin _$ProfitLossAnalyticProductDto {
@JsonKey(name: "product_id")
String? get productId => throw _privateConstructorUsedError;
@JsonKey(name: "product_name")
String? get productName => throw _privateConstructorUsedError;
@JsonKey(name: "category_id")
String? get categoryId => throw _privateConstructorUsedError;
@JsonKey(name: "category_name")
String? get categoryName => throw _privateConstructorUsedError;
@JsonKey(name: "quantity_sold")
int? get quantitySold => throw _privateConstructorUsedError;
@JsonKey(name: "revenue")
int? get revenue => throw _privateConstructorUsedError;
@JsonKey(name: "cost")
num? get cost => throw _privateConstructorUsedError;
@JsonKey(name: "gross_profit")
num? get grossProfit => throw _privateConstructorUsedError;
@JsonKey(name: "gross_profit_margin")
double? get grossProfitMargin => throw _privateConstructorUsedError;
@JsonKey(name: "average_price")
int? get averagePrice => throw _privateConstructorUsedError;
@JsonKey(name: "average_cost")
num? get averageCost => throw _privateConstructorUsedError;
@JsonKey(name: "profit_per_unit")
num? get profitPerUnit => throw _privateConstructorUsedError;
/// Serializes this ProfitLossAnalyticProductDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of ProfitLossAnalyticProductDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProfitLossAnalyticProductDtoCopyWith<ProfitLossAnalyticProductDto>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProfitLossAnalyticProductDtoCopyWith<$Res> {
factory $ProfitLossAnalyticProductDtoCopyWith(
ProfitLossAnalyticProductDto value,
$Res Function(ProfitLossAnalyticProductDto) then,
) =
_$ProfitLossAnalyticProductDtoCopyWithImpl<
$Res,
ProfitLossAnalyticProductDto
>;
@useResult
$Res call({
@JsonKey(name: "product_id") String? productId,
@JsonKey(name: "product_name") String? productName,
@JsonKey(name: "category_id") String? categoryId,
@JsonKey(name: "category_name") String? categoryName,
@JsonKey(name: "quantity_sold") int? quantitySold,
@JsonKey(name: "revenue") int? revenue,
@JsonKey(name: "cost") num? cost,
@JsonKey(name: "gross_profit") num? grossProfit,
@JsonKey(name: "gross_profit_margin") double? grossProfitMargin,
@JsonKey(name: "average_price") int? averagePrice,
@JsonKey(name: "average_cost") num? averageCost,
@JsonKey(name: "profit_per_unit") num? profitPerUnit,
});
}
/// @nodoc
class _$ProfitLossAnalyticProductDtoCopyWithImpl<
$Res,
$Val extends ProfitLossAnalyticProductDto
>
implements $ProfitLossAnalyticProductDtoCopyWith<$Res> {
_$ProfitLossAnalyticProductDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ProfitLossAnalyticProductDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? productId = freezed,
Object? productName = freezed,
Object? categoryId = freezed,
Object? categoryName = freezed,
Object? quantitySold = freezed,
Object? revenue = freezed,
Object? cost = freezed,
Object? grossProfit = freezed,
Object? grossProfitMargin = freezed,
Object? averagePrice = freezed,
Object? averageCost = freezed,
Object? profitPerUnit = freezed,
}) {
return _then(
_value.copyWith(
productId: freezed == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String?,
productName: freezed == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String?,
categoryId: freezed == categoryId
? _value.categoryId
: categoryId // ignore: cast_nullable_to_non_nullable
as String?,
categoryName: freezed == categoryName
? _value.categoryName
: categoryName // ignore: cast_nullable_to_non_nullable
as String?,
quantitySold: freezed == quantitySold
? _value.quantitySold
: quantitySold // ignore: cast_nullable_to_non_nullable
as int?,
revenue: freezed == revenue
? _value.revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int?,
cost: freezed == cost
? _value.cost
: cost // ignore: cast_nullable_to_non_nullable
as num?,
grossProfit: freezed == grossProfit
? _value.grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as num?,
grossProfitMargin: freezed == grossProfitMargin
? _value.grossProfitMargin
: grossProfitMargin // ignore: cast_nullable_to_non_nullable
as double?,
averagePrice: freezed == averagePrice
? _value.averagePrice
: averagePrice // ignore: cast_nullable_to_non_nullable
as int?,
averageCost: freezed == averageCost
? _value.averageCost
: averageCost // ignore: cast_nullable_to_non_nullable
as num?,
profitPerUnit: freezed == profitPerUnit
? _value.profitPerUnit
: profitPerUnit // ignore: cast_nullable_to_non_nullable
as num?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$ProfitLossAnalyticProductDtoImplCopyWith<$Res>
implements $ProfitLossAnalyticProductDtoCopyWith<$Res> {
factory _$$ProfitLossAnalyticProductDtoImplCopyWith(
_$ProfitLossAnalyticProductDtoImpl value,
$Res Function(_$ProfitLossAnalyticProductDtoImpl) then,
) = __$$ProfitLossAnalyticProductDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "product_id") String? productId,
@JsonKey(name: "product_name") String? productName,
@JsonKey(name: "category_id") String? categoryId,
@JsonKey(name: "category_name") String? categoryName,
@JsonKey(name: "quantity_sold") int? quantitySold,
@JsonKey(name: "revenue") int? revenue,
@JsonKey(name: "cost") num? cost,
@JsonKey(name: "gross_profit") num? grossProfit,
@JsonKey(name: "gross_profit_margin") double? grossProfitMargin,
@JsonKey(name: "average_price") int? averagePrice,
@JsonKey(name: "average_cost") num? averageCost,
@JsonKey(name: "profit_per_unit") num? profitPerUnit,
});
}
/// @nodoc
class __$$ProfitLossAnalyticProductDtoImplCopyWithImpl<$Res>
extends
_$ProfitLossAnalyticProductDtoCopyWithImpl<
$Res,
_$ProfitLossAnalyticProductDtoImpl
>
implements _$$ProfitLossAnalyticProductDtoImplCopyWith<$Res> {
__$$ProfitLossAnalyticProductDtoImplCopyWithImpl(
_$ProfitLossAnalyticProductDtoImpl _value,
$Res Function(_$ProfitLossAnalyticProductDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of ProfitLossAnalyticProductDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? productId = freezed,
Object? productName = freezed,
Object? categoryId = freezed,
Object? categoryName = freezed,
Object? quantitySold = freezed,
Object? revenue = freezed,
Object? cost = freezed,
Object? grossProfit = freezed,
Object? grossProfitMargin = freezed,
Object? averagePrice = freezed,
Object? averageCost = freezed,
Object? profitPerUnit = freezed,
}) {
return _then(
_$ProfitLossAnalyticProductDtoImpl(
productId: freezed == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String?,
productName: freezed == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String?,
categoryId: freezed == categoryId
? _value.categoryId
: categoryId // ignore: cast_nullable_to_non_nullable
as String?,
categoryName: freezed == categoryName
? _value.categoryName
: categoryName // ignore: cast_nullable_to_non_nullable
as String?,
quantitySold: freezed == quantitySold
? _value.quantitySold
: quantitySold // ignore: cast_nullable_to_non_nullable
as int?,
revenue: freezed == revenue
? _value.revenue
: revenue // ignore: cast_nullable_to_non_nullable
as int?,
cost: freezed == cost
? _value.cost
: cost // ignore: cast_nullable_to_non_nullable
as num?,
grossProfit: freezed == grossProfit
? _value.grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as num?,
grossProfitMargin: freezed == grossProfitMargin
? _value.grossProfitMargin
: grossProfitMargin // ignore: cast_nullable_to_non_nullable
as double?,
averagePrice: freezed == averagePrice
? _value.averagePrice
: averagePrice // ignore: cast_nullable_to_non_nullable
as int?,
averageCost: freezed == averageCost
? _value.averageCost
: averageCost // ignore: cast_nullable_to_non_nullable
as num?,
profitPerUnit: freezed == profitPerUnit
? _value.profitPerUnit
: profitPerUnit // ignore: cast_nullable_to_non_nullable
as num?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$ProfitLossAnalyticProductDtoImpl extends _ProfitLossAnalyticProductDto {
const _$ProfitLossAnalyticProductDtoImpl({
@JsonKey(name: "product_id") this.productId,
@JsonKey(name: "product_name") this.productName,
@JsonKey(name: "category_id") this.categoryId,
@JsonKey(name: "category_name") this.categoryName,
@JsonKey(name: "quantity_sold") this.quantitySold,
@JsonKey(name: "revenue") this.revenue,
@JsonKey(name: "cost") this.cost,
@JsonKey(name: "gross_profit") this.grossProfit,
@JsonKey(name: "gross_profit_margin") this.grossProfitMargin,
@JsonKey(name: "average_price") this.averagePrice,
@JsonKey(name: "average_cost") this.averageCost,
@JsonKey(name: "profit_per_unit") this.profitPerUnit,
}) : super._();
factory _$ProfitLossAnalyticProductDtoImpl.fromJson(
Map<String, dynamic> json,
) => _$$ProfitLossAnalyticProductDtoImplFromJson(json);
@override
@JsonKey(name: "product_id")
final String? productId;
@override
@JsonKey(name: "product_name")
final String? productName;
@override
@JsonKey(name: "category_id")
final String? categoryId;
@override
@JsonKey(name: "category_name")
final String? categoryName;
@override
@JsonKey(name: "quantity_sold")
final int? quantitySold;
@override
@JsonKey(name: "revenue")
final int? revenue;
@override
@JsonKey(name: "cost")
final num? cost;
@override
@JsonKey(name: "gross_profit")
final num? grossProfit;
@override
@JsonKey(name: "gross_profit_margin")
final double? grossProfitMargin;
@override
@JsonKey(name: "average_price")
final int? averagePrice;
@override
@JsonKey(name: "average_cost")
final num? averageCost;
@override
@JsonKey(name: "profit_per_unit")
final num? profitPerUnit;
@override
String toString() {
return 'ProfitLossAnalyticProductDto(productId: $productId, productName: $productName, categoryId: $categoryId, categoryName: $categoryName, quantitySold: $quantitySold, revenue: $revenue, cost: $cost, grossProfit: $grossProfit, grossProfitMargin: $grossProfitMargin, averagePrice: $averagePrice, averageCost: $averageCost, profitPerUnit: $profitPerUnit)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfitLossAnalyticProductDtoImpl &&
(identical(other.productId, productId) ||
other.productId == productId) &&
(identical(other.productName, productName) ||
other.productName == productName) &&
(identical(other.categoryId, categoryId) ||
other.categoryId == categoryId) &&
(identical(other.categoryName, categoryName) ||
other.categoryName == categoryName) &&
(identical(other.quantitySold, quantitySold) ||
other.quantitySold == quantitySold) &&
(identical(other.revenue, revenue) || other.revenue == revenue) &&
(identical(other.cost, cost) || other.cost == cost) &&
(identical(other.grossProfit, grossProfit) ||
other.grossProfit == grossProfit) &&
(identical(other.grossProfitMargin, grossProfitMargin) ||
other.grossProfitMargin == grossProfitMargin) &&
(identical(other.averagePrice, averagePrice) ||
other.averagePrice == averagePrice) &&
(identical(other.averageCost, averageCost) ||
other.averageCost == averageCost) &&
(identical(other.profitPerUnit, profitPerUnit) ||
other.profitPerUnit == profitPerUnit));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
productId,
productName,
categoryId,
categoryName,
quantitySold,
revenue,
cost,
grossProfit,
grossProfitMargin,
averagePrice,
averageCost,
profitPerUnit,
);
/// Create a copy of ProfitLossAnalyticProductDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProfitLossAnalyticProductDtoImplCopyWith<
_$ProfitLossAnalyticProductDtoImpl
>
get copyWith =>
__$$ProfitLossAnalyticProductDtoImplCopyWithImpl<
_$ProfitLossAnalyticProductDtoImpl
>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$ProfitLossAnalyticProductDtoImplToJson(this);
}
}
abstract class _ProfitLossAnalyticProductDto
extends ProfitLossAnalyticProductDto {
const factory _ProfitLossAnalyticProductDto({
@JsonKey(name: "product_id") final String? productId,
@JsonKey(name: "product_name") final String? productName,
@JsonKey(name: "category_id") final String? categoryId,
@JsonKey(name: "category_name") final String? categoryName,
@JsonKey(name: "quantity_sold") final int? quantitySold,
@JsonKey(name: "revenue") final int? revenue,
@JsonKey(name: "cost") final num? cost,
@JsonKey(name: "gross_profit") final num? grossProfit,
@JsonKey(name: "gross_profit_margin") final double? grossProfitMargin,
@JsonKey(name: "average_price") final int? averagePrice,
@JsonKey(name: "average_cost") final num? averageCost,
@JsonKey(name: "profit_per_unit") final num? profitPerUnit,
}) = _$ProfitLossAnalyticProductDtoImpl;
const _ProfitLossAnalyticProductDto._() : super._();
factory _ProfitLossAnalyticProductDto.fromJson(Map<String, dynamic> json) =
_$ProfitLossAnalyticProductDtoImpl.fromJson;
@override
@JsonKey(name: "product_id")
String? get productId;
@override
@JsonKey(name: "product_name")
String? get productName;
@override
@JsonKey(name: "category_id")
String? get categoryId;
@override
@JsonKey(name: "category_name")
String? get categoryName;
@override
@JsonKey(name: "quantity_sold")
int? get quantitySold;
@override
@JsonKey(name: "revenue")
int? get revenue;
@override
@JsonKey(name: "cost")
num? get cost;
@override
@JsonKey(name: "gross_profit")
num? get grossProfit;
@override
@JsonKey(name: "gross_profit_margin")
double? get grossProfitMargin;
@override
@JsonKey(name: "average_price")
int? get averagePrice;
@override
@JsonKey(name: "average_cost")
num? get averageCost;
@override
@JsonKey(name: "profit_per_unit")
num? get profitPerUnit;
/// Create a copy of ProfitLossAnalyticProductDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfitLossAnalyticProductDtoImplCopyWith<
_$ProfitLossAnalyticProductDtoImpl
>
get copyWith => throw _privateConstructorUsedError;
}
2025-11-03 23:24:16 +07:00
CategoryAnalyticDto _$CategoryAnalyticDtoFromJson(Map<String, dynamic> json) {
return _CategoryAnalyticDto.fromJson(json);
}
/// @nodoc
mixin _$CategoryAnalyticDto {
@JsonKey(name: "organization_id")
String? get organizationId => throw _privateConstructorUsedError;
@JsonKey(name: "outlet_id")
String? get outletId => throw _privateConstructorUsedError;
@JsonKey(name: "date_from")
DateTime? get dateFrom => throw _privateConstructorUsedError;
@JsonKey(name: "date_to")
DateTime? get dateTo => throw _privateConstructorUsedError;
List<CategoryAnalyticItemDto>? get data => throw _privateConstructorUsedError;
/// Serializes this CategoryAnalyticDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of CategoryAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$CategoryAnalyticDtoCopyWith<CategoryAnalyticDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $CategoryAnalyticDtoCopyWith<$Res> {
factory $CategoryAnalyticDtoCopyWith(
CategoryAnalyticDto value,
$Res Function(CategoryAnalyticDto) then,
) = _$CategoryAnalyticDtoCopyWithImpl<$Res, CategoryAnalyticDto>;
@useResult
$Res call({
@JsonKey(name: "organization_id") String? organizationId,
@JsonKey(name: "outlet_id") String? outletId,
@JsonKey(name: "date_from") DateTime? dateFrom,
@JsonKey(name: "date_to") DateTime? dateTo,
List<CategoryAnalyticItemDto>? data,
});
}
/// @nodoc
class _$CategoryAnalyticDtoCopyWithImpl<$Res, $Val extends CategoryAnalyticDto>
implements $CategoryAnalyticDtoCopyWith<$Res> {
_$CategoryAnalyticDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of CategoryAnalyticDto
/// 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? 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 DateTime?,
dateTo: freezed == dateTo
? _value.dateTo
: dateTo // ignore: cast_nullable_to_non_nullable
as DateTime?,
data: freezed == data
? _value.data
: data // ignore: cast_nullable_to_non_nullable
as List<CategoryAnalyticItemDto>?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$CategoryAnalyticDtoImplCopyWith<$Res>
implements $CategoryAnalyticDtoCopyWith<$Res> {
factory _$$CategoryAnalyticDtoImplCopyWith(
_$CategoryAnalyticDtoImpl value,
$Res Function(_$CategoryAnalyticDtoImpl) then,
) = __$$CategoryAnalyticDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "organization_id") String? organizationId,
@JsonKey(name: "outlet_id") String? outletId,
@JsonKey(name: "date_from") DateTime? dateFrom,
@JsonKey(name: "date_to") DateTime? dateTo,
List<CategoryAnalyticItemDto>? data,
});
}
/// @nodoc
class __$$CategoryAnalyticDtoImplCopyWithImpl<$Res>
extends _$CategoryAnalyticDtoCopyWithImpl<$Res, _$CategoryAnalyticDtoImpl>
implements _$$CategoryAnalyticDtoImplCopyWith<$Res> {
__$$CategoryAnalyticDtoImplCopyWithImpl(
_$CategoryAnalyticDtoImpl _value,
$Res Function(_$CategoryAnalyticDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of CategoryAnalyticDto
/// 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? data = freezed,
}) {
return _then(
_$CategoryAnalyticDtoImpl(
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 DateTime?,
dateTo: freezed == dateTo
? _value.dateTo
: dateTo // ignore: cast_nullable_to_non_nullable
as DateTime?,
data: freezed == data
? _value._data
: data // ignore: cast_nullable_to_non_nullable
as List<CategoryAnalyticItemDto>?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$CategoryAnalyticDtoImpl extends _CategoryAnalyticDto {
const _$CategoryAnalyticDtoImpl({
@JsonKey(name: "organization_id") this.organizationId,
@JsonKey(name: "outlet_id") this.outletId,
@JsonKey(name: "date_from") this.dateFrom,
@JsonKey(name: "date_to") this.dateTo,
final List<CategoryAnalyticItemDto>? data,
}) : _data = data,
super._();
factory _$CategoryAnalyticDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$CategoryAnalyticDtoImplFromJson(json);
@override
@JsonKey(name: "organization_id")
final String? organizationId;
@override
@JsonKey(name: "outlet_id")
final String? outletId;
@override
@JsonKey(name: "date_from")
final DateTime? dateFrom;
@override
@JsonKey(name: "date_to")
final DateTime? dateTo;
final List<CategoryAnalyticItemDto>? _data;
@override
List<CategoryAnalyticItemDto>? 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 'CategoryAnalyticDto(organizationId: $organizationId, outletId: $outletId, dateFrom: $dateFrom, dateTo: $dateTo, data: $data)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CategoryAnalyticDtoImpl &&
(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) &&
const DeepCollectionEquality().equals(other._data, _data));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
organizationId,
outletId,
dateFrom,
dateTo,
const DeepCollectionEquality().hash(_data),
);
/// Create a copy of CategoryAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$CategoryAnalyticDtoImplCopyWith<_$CategoryAnalyticDtoImpl> get copyWith =>
__$$CategoryAnalyticDtoImplCopyWithImpl<_$CategoryAnalyticDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$CategoryAnalyticDtoImplToJson(this);
}
}
abstract class _CategoryAnalyticDto extends CategoryAnalyticDto {
const factory _CategoryAnalyticDto({
@JsonKey(name: "organization_id") final String? organizationId,
@JsonKey(name: "outlet_id") final String? outletId,
@JsonKey(name: "date_from") final DateTime? dateFrom,
@JsonKey(name: "date_to") final DateTime? dateTo,
final List<CategoryAnalyticItemDto>? data,
}) = _$CategoryAnalyticDtoImpl;
const _CategoryAnalyticDto._() : super._();
factory _CategoryAnalyticDto.fromJson(Map<String, dynamic> json) =
_$CategoryAnalyticDtoImpl.fromJson;
@override
@JsonKey(name: "organization_id")
String? get organizationId;
@override
@JsonKey(name: "outlet_id")
String? get outletId;
@override
@JsonKey(name: "date_from")
DateTime? get dateFrom;
@override
@JsonKey(name: "date_to")
DateTime? get dateTo;
@override
List<CategoryAnalyticItemDto>? get data;
/// Create a copy of CategoryAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CategoryAnalyticDtoImplCopyWith<_$CategoryAnalyticDtoImpl> get copyWith =>
throw _privateConstructorUsedError;
}
CategoryAnalyticItemDto _$CategoryAnalyticItemDtoFromJson(
Map<String, dynamic> json,
) {
return _CategoryAnalyticItemDto.fromJson(json);
}
/// @nodoc
mixin _$CategoryAnalyticItemDto {
@JsonKey(name: "category_id")
String? get categoryId => throw _privateConstructorUsedError;
@JsonKey(name: "category_name")
String? get categoryName => throw _privateConstructorUsedError;
@JsonKey(name: "total_revenue")
int? get totalRevenue => throw _privateConstructorUsedError;
@JsonKey(name: "total_quantity")
int? get totalQuantity => throw _privateConstructorUsedError;
@JsonKey(name: "product_count")
int? get productCount => throw _privateConstructorUsedError;
@JsonKey(name: "order_count")
int? get orderCount => throw _privateConstructorUsedError;
/// Serializes this CategoryAnalyticItemDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of CategoryAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$CategoryAnalyticItemDtoCopyWith<CategoryAnalyticItemDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $CategoryAnalyticItemDtoCopyWith<$Res> {
factory $CategoryAnalyticItemDtoCopyWith(
CategoryAnalyticItemDto value,
$Res Function(CategoryAnalyticItemDto) then,
) = _$CategoryAnalyticItemDtoCopyWithImpl<$Res, CategoryAnalyticItemDto>;
@useResult
$Res call({
@JsonKey(name: "category_id") String? categoryId,
@JsonKey(name: "category_name") String? categoryName,
@JsonKey(name: "total_revenue") int? totalRevenue,
@JsonKey(name: "total_quantity") int? totalQuantity,
@JsonKey(name: "product_count") int? productCount,
@JsonKey(name: "order_count") int? orderCount,
});
}
/// @nodoc
class _$CategoryAnalyticItemDtoCopyWithImpl<
$Res,
$Val extends CategoryAnalyticItemDto
>
implements $CategoryAnalyticItemDtoCopyWith<$Res> {
_$CategoryAnalyticItemDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of CategoryAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? categoryId = freezed,
Object? categoryName = freezed,
Object? totalRevenue = freezed,
Object? totalQuantity = freezed,
Object? productCount = freezed,
Object? orderCount = freezed,
}) {
return _then(
_value.copyWith(
categoryId: freezed == categoryId
? _value.categoryId
: categoryId // ignore: cast_nullable_to_non_nullable
as String?,
categoryName: freezed == categoryName
? _value.categoryName
: categoryName // ignore: cast_nullable_to_non_nullable
as String?,
totalRevenue: freezed == totalRevenue
? _value.totalRevenue
: totalRevenue // ignore: cast_nullable_to_non_nullable
as int?,
totalQuantity: freezed == totalQuantity
? _value.totalQuantity
: totalQuantity // ignore: cast_nullable_to_non_nullable
as int?,
productCount: freezed == productCount
? _value.productCount
: productCount // ignore: cast_nullable_to_non_nullable
as int?,
orderCount: freezed == orderCount
? _value.orderCount
: orderCount // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$CategoryAnalyticItemDtoImplCopyWith<$Res>
implements $CategoryAnalyticItemDtoCopyWith<$Res> {
factory _$$CategoryAnalyticItemDtoImplCopyWith(
_$CategoryAnalyticItemDtoImpl value,
$Res Function(_$CategoryAnalyticItemDtoImpl) then,
) = __$$CategoryAnalyticItemDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "category_id") String? categoryId,
@JsonKey(name: "category_name") String? categoryName,
@JsonKey(name: "total_revenue") int? totalRevenue,
@JsonKey(name: "total_quantity") int? totalQuantity,
@JsonKey(name: "product_count") int? productCount,
@JsonKey(name: "order_count") int? orderCount,
});
}
/// @nodoc
class __$$CategoryAnalyticItemDtoImplCopyWithImpl<$Res>
extends
_$CategoryAnalyticItemDtoCopyWithImpl<
$Res,
_$CategoryAnalyticItemDtoImpl
>
implements _$$CategoryAnalyticItemDtoImplCopyWith<$Res> {
__$$CategoryAnalyticItemDtoImplCopyWithImpl(
_$CategoryAnalyticItemDtoImpl _value,
$Res Function(_$CategoryAnalyticItemDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of CategoryAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? categoryId = freezed,
Object? categoryName = freezed,
Object? totalRevenue = freezed,
Object? totalQuantity = freezed,
Object? productCount = freezed,
Object? orderCount = freezed,
}) {
return _then(
_$CategoryAnalyticItemDtoImpl(
categoryId: freezed == categoryId
? _value.categoryId
: categoryId // ignore: cast_nullable_to_non_nullable
as String?,
categoryName: freezed == categoryName
? _value.categoryName
: categoryName // ignore: cast_nullable_to_non_nullable
as String?,
totalRevenue: freezed == totalRevenue
? _value.totalRevenue
: totalRevenue // ignore: cast_nullable_to_non_nullable
as int?,
totalQuantity: freezed == totalQuantity
? _value.totalQuantity
: totalQuantity // ignore: cast_nullable_to_non_nullable
as int?,
productCount: freezed == productCount
? _value.productCount
: productCount // ignore: cast_nullable_to_non_nullable
as int?,
orderCount: freezed == orderCount
? _value.orderCount
: orderCount // ignore: cast_nullable_to_non_nullable
as int?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$CategoryAnalyticItemDtoImpl extends _CategoryAnalyticItemDto {
const _$CategoryAnalyticItemDtoImpl({
@JsonKey(name: "category_id") this.categoryId,
@JsonKey(name: "category_name") this.categoryName,
@JsonKey(name: "total_revenue") this.totalRevenue,
@JsonKey(name: "total_quantity") this.totalQuantity,
@JsonKey(name: "product_count") this.productCount,
@JsonKey(name: "order_count") this.orderCount,
}) : super._();
factory _$CategoryAnalyticItemDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$CategoryAnalyticItemDtoImplFromJson(json);
@override
@JsonKey(name: "category_id")
final String? categoryId;
@override
@JsonKey(name: "category_name")
final String? categoryName;
@override
@JsonKey(name: "total_revenue")
final int? totalRevenue;
@override
@JsonKey(name: "total_quantity")
final int? totalQuantity;
@override
@JsonKey(name: "product_count")
final int? productCount;
@override
@JsonKey(name: "order_count")
final int? orderCount;
@override
String toString() {
return 'CategoryAnalyticItemDto(categoryId: $categoryId, categoryName: $categoryName, totalRevenue: $totalRevenue, totalQuantity: $totalQuantity, productCount: $productCount, orderCount: $orderCount)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CategoryAnalyticItemDtoImpl &&
(identical(other.categoryId, categoryId) ||
other.categoryId == categoryId) &&
(identical(other.categoryName, categoryName) ||
other.categoryName == categoryName) &&
(identical(other.totalRevenue, totalRevenue) ||
other.totalRevenue == totalRevenue) &&
(identical(other.totalQuantity, totalQuantity) ||
other.totalQuantity == totalQuantity) &&
(identical(other.productCount, productCount) ||
other.productCount == productCount) &&
(identical(other.orderCount, orderCount) ||
other.orderCount == orderCount));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
categoryId,
categoryName,
totalRevenue,
totalQuantity,
productCount,
orderCount,
);
/// Create a copy of CategoryAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$CategoryAnalyticItemDtoImplCopyWith<_$CategoryAnalyticItemDtoImpl>
get copyWith =>
__$$CategoryAnalyticItemDtoImplCopyWithImpl<
_$CategoryAnalyticItemDtoImpl
>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$CategoryAnalyticItemDtoImplToJson(this);
}
}
abstract class _CategoryAnalyticItemDto extends CategoryAnalyticItemDto {
const factory _CategoryAnalyticItemDto({
@JsonKey(name: "category_id") final String? categoryId,
@JsonKey(name: "category_name") final String? categoryName,
@JsonKey(name: "total_revenue") final int? totalRevenue,
@JsonKey(name: "total_quantity") final int? totalQuantity,
@JsonKey(name: "product_count") final int? productCount,
@JsonKey(name: "order_count") final int? orderCount,
}) = _$CategoryAnalyticItemDtoImpl;
const _CategoryAnalyticItemDto._() : super._();
factory _CategoryAnalyticItemDto.fromJson(Map<String, dynamic> json) =
_$CategoryAnalyticItemDtoImpl.fromJson;
@override
@JsonKey(name: "category_id")
String? get categoryId;
@override
@JsonKey(name: "category_name")
String? get categoryName;
@override
@JsonKey(name: "total_revenue")
int? get totalRevenue;
@override
@JsonKey(name: "total_quantity")
int? get totalQuantity;
@override
@JsonKey(name: "product_count")
int? get productCount;
@override
@JsonKey(name: "order_count")
int? get orderCount;
/// Create a copy of CategoryAnalyticItemDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CategoryAnalyticItemDtoImplCopyWith<_$CategoryAnalyticItemDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}
2025-11-04 00:21:15 +07:00
InventoryAnalyticDto _$InventoryAnalyticDtoFromJson(Map<String, dynamic> json) {
return _InventoryAnalyticDto.fromJson(json);
}
/// @nodoc
mixin _$InventoryAnalyticDto {
@JsonKey(name: "summary")
InventoryAnalyticSummaryDto? get summary =>
throw _privateConstructorUsedError;
@JsonKey(name: "products")
List<InventoryAnalyticProductItemDto>? get products =>
throw _privateConstructorUsedError;
@JsonKey(name: "ingredients")
List<InventoryAnalyticIngredientItemDto>? get ingredients =>
throw _privateConstructorUsedError;
/// Serializes this InventoryAnalyticDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of InventoryAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$InventoryAnalyticDtoCopyWith<InventoryAnalyticDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $InventoryAnalyticDtoCopyWith<$Res> {
factory $InventoryAnalyticDtoCopyWith(
InventoryAnalyticDto value,
$Res Function(InventoryAnalyticDto) then,
) = _$InventoryAnalyticDtoCopyWithImpl<$Res, InventoryAnalyticDto>;
@useResult
$Res call({
@JsonKey(name: "summary") InventoryAnalyticSummaryDto? summary,
@JsonKey(name: "products") List<InventoryAnalyticProductItemDto>? products,
@JsonKey(name: "ingredients")
List<InventoryAnalyticIngredientItemDto>? ingredients,
});
$InventoryAnalyticSummaryDtoCopyWith<$Res>? get summary;
}
/// @nodoc
class _$InventoryAnalyticDtoCopyWithImpl<
$Res,
$Val extends InventoryAnalyticDto
>
implements $InventoryAnalyticDtoCopyWith<$Res> {
_$InventoryAnalyticDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of InventoryAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? summary = freezed,
Object? products = freezed,
Object? ingredients = freezed,
}) {
return _then(
_value.copyWith(
summary: freezed == summary
? _value.summary
: summary // ignore: cast_nullable_to_non_nullable
as InventoryAnalyticSummaryDto?,
products: freezed == products
? _value.products
: products // ignore: cast_nullable_to_non_nullable
as List<InventoryAnalyticProductItemDto>?,
ingredients: freezed == ingredients
? _value.ingredients
: ingredients // ignore: cast_nullable_to_non_nullable
as List<InventoryAnalyticIngredientItemDto>?,
)
as $Val,
);
}
/// Create a copy of InventoryAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$InventoryAnalyticSummaryDtoCopyWith<$Res>? get summary {
if (_value.summary == null) {
return null;
}
return $InventoryAnalyticSummaryDtoCopyWith<$Res>(_value.summary!, (value) {
return _then(_value.copyWith(summary: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$InventoryAnalyticDtoImplCopyWith<$Res>
implements $InventoryAnalyticDtoCopyWith<$Res> {
factory _$$InventoryAnalyticDtoImplCopyWith(
_$InventoryAnalyticDtoImpl value,
$Res Function(_$InventoryAnalyticDtoImpl) then,
) = __$$InventoryAnalyticDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "summary") InventoryAnalyticSummaryDto? summary,
@JsonKey(name: "products") List<InventoryAnalyticProductItemDto>? products,
@JsonKey(name: "ingredients")
List<InventoryAnalyticIngredientItemDto>? ingredients,
});
@override
$InventoryAnalyticSummaryDtoCopyWith<$Res>? get summary;
}
/// @nodoc
class __$$InventoryAnalyticDtoImplCopyWithImpl<$Res>
extends _$InventoryAnalyticDtoCopyWithImpl<$Res, _$InventoryAnalyticDtoImpl>
implements _$$InventoryAnalyticDtoImplCopyWith<$Res> {
__$$InventoryAnalyticDtoImplCopyWithImpl(
_$InventoryAnalyticDtoImpl _value,
$Res Function(_$InventoryAnalyticDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of InventoryAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? summary = freezed,
Object? products = freezed,
Object? ingredients = freezed,
}) {
return _then(
_$InventoryAnalyticDtoImpl(
summary: freezed == summary
? _value.summary
: summary // ignore: cast_nullable_to_non_nullable
as InventoryAnalyticSummaryDto?,
products: freezed == products
? _value._products
: products // ignore: cast_nullable_to_non_nullable
as List<InventoryAnalyticProductItemDto>?,
ingredients: freezed == ingredients
? _value._ingredients
: ingredients // ignore: cast_nullable_to_non_nullable
as List<InventoryAnalyticIngredientItemDto>?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$InventoryAnalyticDtoImpl extends _InventoryAnalyticDto {
const _$InventoryAnalyticDtoImpl({
@JsonKey(name: "summary") this.summary,
@JsonKey(name: "products")
final List<InventoryAnalyticProductItemDto>? products,
@JsonKey(name: "ingredients")
final List<InventoryAnalyticIngredientItemDto>? ingredients,
}) : _products = products,
_ingredients = ingredients,
super._();
factory _$InventoryAnalyticDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$InventoryAnalyticDtoImplFromJson(json);
@override
@JsonKey(name: "summary")
final InventoryAnalyticSummaryDto? summary;
final List<InventoryAnalyticProductItemDto>? _products;
@override
@JsonKey(name: "products")
List<InventoryAnalyticProductItemDto>? get products {
final value = _products;
if (value == null) return null;
if (_products is EqualUnmodifiableListView) return _products;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
final List<InventoryAnalyticIngredientItemDto>? _ingredients;
@override
@JsonKey(name: "ingredients")
List<InventoryAnalyticIngredientItemDto>? get ingredients {
final value = _ingredients;
if (value == null) return null;
if (_ingredients is EqualUnmodifiableListView) return _ingredients;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override
String toString() {
return 'InventoryAnalyticDto(summary: $summary, products: $products, ingredients: $ingredients)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$InventoryAnalyticDtoImpl &&
(identical(other.summary, summary) || other.summary == summary) &&
const DeepCollectionEquality().equals(other._products, _products) &&
const DeepCollectionEquality().equals(
other._ingredients,
_ingredients,
));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
summary,
const DeepCollectionEquality().hash(_products),
const DeepCollectionEquality().hash(_ingredients),
);
/// Create a copy of InventoryAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$InventoryAnalyticDtoImplCopyWith<_$InventoryAnalyticDtoImpl>
get copyWith =>
__$$InventoryAnalyticDtoImplCopyWithImpl<_$InventoryAnalyticDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$InventoryAnalyticDtoImplToJson(this);
}
}
abstract class _InventoryAnalyticDto extends InventoryAnalyticDto {
const factory _InventoryAnalyticDto({
@JsonKey(name: "summary") final InventoryAnalyticSummaryDto? summary,
@JsonKey(name: "products")
final List<InventoryAnalyticProductItemDto>? products,
@JsonKey(name: "ingredients")
final List<InventoryAnalyticIngredientItemDto>? ingredients,
}) = _$InventoryAnalyticDtoImpl;
const _InventoryAnalyticDto._() : super._();
factory _InventoryAnalyticDto.fromJson(Map<String, dynamic> json) =
_$InventoryAnalyticDtoImpl.fromJson;
@override
@JsonKey(name: "summary")
InventoryAnalyticSummaryDto? get summary;
@override
@JsonKey(name: "products")
List<InventoryAnalyticProductItemDto>? get products;
@override
@JsonKey(name: "ingredients")
List<InventoryAnalyticIngredientItemDto>? get ingredients;
/// Create a copy of InventoryAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$InventoryAnalyticDtoImplCopyWith<_$InventoryAnalyticDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}
InventoryAnalyticSummaryDto _$InventoryAnalyticSummaryDtoFromJson(
Map<String, dynamic> json,
) {
return _InventoryAnalyticSummaryDto.fromJson(json);
}
/// @nodoc
mixin _$InventoryAnalyticSummaryDto {
@JsonKey(name: "total_products")
int? get totalProducts => throw _privateConstructorUsedError;
@JsonKey(name: "total_ingredients")
int? get totalIngredients => throw _privateConstructorUsedError;
@JsonKey(name: "total_value")
int? get totalValue => throw _privateConstructorUsedError;
@JsonKey(name: "low_stock_products")
int? get lowStockProducts => throw _privateConstructorUsedError;
@JsonKey(name: "low_stock_ingredients")
int? get lowStockIngredients => throw _privateConstructorUsedError;
@JsonKey(name: "zero_stock_products")
int? get zeroStockProducts => throw _privateConstructorUsedError;
@JsonKey(name: "zero_stock_ingredients")
int? get zeroStockIngredients => throw _privateConstructorUsedError;
@JsonKey(name: "total_sold_products")
int? get totalSoldProducts => throw _privateConstructorUsedError;
@JsonKey(name: "total_sold_ingredients")
int? get totalSoldIngredients => throw _privateConstructorUsedError;
@JsonKey(name: "outlet_id")
String? get outletId => throw _privateConstructorUsedError;
@JsonKey(name: "outlet_name")
String? get outletName => throw _privateConstructorUsedError;
@JsonKey(name: "generated_at")
DateTime? get generatedAt => throw _privateConstructorUsedError;
/// Serializes this InventoryAnalyticSummaryDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of InventoryAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$InventoryAnalyticSummaryDtoCopyWith<InventoryAnalyticSummaryDto>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $InventoryAnalyticSummaryDtoCopyWith<$Res> {
factory $InventoryAnalyticSummaryDtoCopyWith(
InventoryAnalyticSummaryDto value,
$Res Function(InventoryAnalyticSummaryDto) then,
) =
_$InventoryAnalyticSummaryDtoCopyWithImpl<
$Res,
InventoryAnalyticSummaryDto
>;
@useResult
$Res call({
@JsonKey(name: "total_products") int? totalProducts,
@JsonKey(name: "total_ingredients") int? totalIngredients,
@JsonKey(name: "total_value") int? totalValue,
@JsonKey(name: "low_stock_products") int? lowStockProducts,
@JsonKey(name: "low_stock_ingredients") int? lowStockIngredients,
@JsonKey(name: "zero_stock_products") int? zeroStockProducts,
@JsonKey(name: "zero_stock_ingredients") int? zeroStockIngredients,
@JsonKey(name: "total_sold_products") int? totalSoldProducts,
@JsonKey(name: "total_sold_ingredients") int? totalSoldIngredients,
@JsonKey(name: "outlet_id") String? outletId,
@JsonKey(name: "outlet_name") String? outletName,
@JsonKey(name: "generated_at") DateTime? generatedAt,
});
}
/// @nodoc
class _$InventoryAnalyticSummaryDtoCopyWithImpl<
$Res,
$Val extends InventoryAnalyticSummaryDto
>
implements $InventoryAnalyticSummaryDtoCopyWith<$Res> {
_$InventoryAnalyticSummaryDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of InventoryAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? totalProducts = freezed,
Object? totalIngredients = freezed,
Object? totalValue = freezed,
Object? lowStockProducts = freezed,
Object? lowStockIngredients = freezed,
Object? zeroStockProducts = freezed,
Object? zeroStockIngredients = freezed,
Object? totalSoldProducts = freezed,
Object? totalSoldIngredients = freezed,
Object? outletId = freezed,
Object? outletName = freezed,
Object? generatedAt = freezed,
}) {
return _then(
_value.copyWith(
totalProducts: freezed == totalProducts
? _value.totalProducts
: totalProducts // ignore: cast_nullable_to_non_nullable
as int?,
totalIngredients: freezed == totalIngredients
? _value.totalIngredients
: totalIngredients // ignore: cast_nullable_to_non_nullable
as int?,
totalValue: freezed == totalValue
? _value.totalValue
: totalValue // ignore: cast_nullable_to_non_nullable
as int?,
lowStockProducts: freezed == lowStockProducts
? _value.lowStockProducts
: lowStockProducts // ignore: cast_nullable_to_non_nullable
as int?,
lowStockIngredients: freezed == lowStockIngredients
? _value.lowStockIngredients
: lowStockIngredients // ignore: cast_nullable_to_non_nullable
as int?,
zeroStockProducts: freezed == zeroStockProducts
? _value.zeroStockProducts
: zeroStockProducts // ignore: cast_nullable_to_non_nullable
as int?,
zeroStockIngredients: freezed == zeroStockIngredients
? _value.zeroStockIngredients
: zeroStockIngredients // ignore: cast_nullable_to_non_nullable
as int?,
totalSoldProducts: freezed == totalSoldProducts
? _value.totalSoldProducts
: totalSoldProducts // ignore: cast_nullable_to_non_nullable
as int?,
totalSoldIngredients: freezed == totalSoldIngredients
? _value.totalSoldIngredients
: totalSoldIngredients // ignore: cast_nullable_to_non_nullable
as int?,
outletId: freezed == outletId
? _value.outletId
: outletId // ignore: cast_nullable_to_non_nullable
as String?,
outletName: freezed == outletName
? _value.outletName
: outletName // ignore: cast_nullable_to_non_nullable
as String?,
generatedAt: freezed == generatedAt
? _value.generatedAt
: generatedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$InventoryAnalyticSummaryDtoImplCopyWith<$Res>
implements $InventoryAnalyticSummaryDtoCopyWith<$Res> {
factory _$$InventoryAnalyticSummaryDtoImplCopyWith(
_$InventoryAnalyticSummaryDtoImpl value,
$Res Function(_$InventoryAnalyticSummaryDtoImpl) then,
) = __$$InventoryAnalyticSummaryDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "total_products") int? totalProducts,
@JsonKey(name: "total_ingredients") int? totalIngredients,
@JsonKey(name: "total_value") int? totalValue,
@JsonKey(name: "low_stock_products") int? lowStockProducts,
@JsonKey(name: "low_stock_ingredients") int? lowStockIngredients,
@JsonKey(name: "zero_stock_products") int? zeroStockProducts,
@JsonKey(name: "zero_stock_ingredients") int? zeroStockIngredients,
@JsonKey(name: "total_sold_products") int? totalSoldProducts,
@JsonKey(name: "total_sold_ingredients") int? totalSoldIngredients,
@JsonKey(name: "outlet_id") String? outletId,
@JsonKey(name: "outlet_name") String? outletName,
@JsonKey(name: "generated_at") DateTime? generatedAt,
});
}
/// @nodoc
class __$$InventoryAnalyticSummaryDtoImplCopyWithImpl<$Res>
extends
_$InventoryAnalyticSummaryDtoCopyWithImpl<
$Res,
_$InventoryAnalyticSummaryDtoImpl
>
implements _$$InventoryAnalyticSummaryDtoImplCopyWith<$Res> {
__$$InventoryAnalyticSummaryDtoImplCopyWithImpl(
_$InventoryAnalyticSummaryDtoImpl _value,
$Res Function(_$InventoryAnalyticSummaryDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of InventoryAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? totalProducts = freezed,
Object? totalIngredients = freezed,
Object? totalValue = freezed,
Object? lowStockProducts = freezed,
Object? lowStockIngredients = freezed,
Object? zeroStockProducts = freezed,
Object? zeroStockIngredients = freezed,
Object? totalSoldProducts = freezed,
Object? totalSoldIngredients = freezed,
Object? outletId = freezed,
Object? outletName = freezed,
Object? generatedAt = freezed,
}) {
return _then(
_$InventoryAnalyticSummaryDtoImpl(
totalProducts: freezed == totalProducts
? _value.totalProducts
: totalProducts // ignore: cast_nullable_to_non_nullable
as int?,
totalIngredients: freezed == totalIngredients
? _value.totalIngredients
: totalIngredients // ignore: cast_nullable_to_non_nullable
as int?,
totalValue: freezed == totalValue
? _value.totalValue
: totalValue // ignore: cast_nullable_to_non_nullable
as int?,
lowStockProducts: freezed == lowStockProducts
? _value.lowStockProducts
: lowStockProducts // ignore: cast_nullable_to_non_nullable
as int?,
lowStockIngredients: freezed == lowStockIngredients
? _value.lowStockIngredients
: lowStockIngredients // ignore: cast_nullable_to_non_nullable
as int?,
zeroStockProducts: freezed == zeroStockProducts
? _value.zeroStockProducts
: zeroStockProducts // ignore: cast_nullable_to_non_nullable
as int?,
zeroStockIngredients: freezed == zeroStockIngredients
? _value.zeroStockIngredients
: zeroStockIngredients // ignore: cast_nullable_to_non_nullable
as int?,
totalSoldProducts: freezed == totalSoldProducts
? _value.totalSoldProducts
: totalSoldProducts // ignore: cast_nullable_to_non_nullable
as int?,
totalSoldIngredients: freezed == totalSoldIngredients
? _value.totalSoldIngredients
: totalSoldIngredients // ignore: cast_nullable_to_non_nullable
as int?,
outletId: freezed == outletId
? _value.outletId
: outletId // ignore: cast_nullable_to_non_nullable
as String?,
outletName: freezed == outletName
? _value.outletName
: outletName // ignore: cast_nullable_to_non_nullable
as String?,
generatedAt: freezed == generatedAt
? _value.generatedAt
: generatedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$InventoryAnalyticSummaryDtoImpl extends _InventoryAnalyticSummaryDto {
const _$InventoryAnalyticSummaryDtoImpl({
@JsonKey(name: "total_products") this.totalProducts,
@JsonKey(name: "total_ingredients") this.totalIngredients,
@JsonKey(name: "total_value") this.totalValue,
@JsonKey(name: "low_stock_products") this.lowStockProducts,
@JsonKey(name: "low_stock_ingredients") this.lowStockIngredients,
@JsonKey(name: "zero_stock_products") this.zeroStockProducts,
@JsonKey(name: "zero_stock_ingredients") this.zeroStockIngredients,
@JsonKey(name: "total_sold_products") this.totalSoldProducts,
@JsonKey(name: "total_sold_ingredients") this.totalSoldIngredients,
@JsonKey(name: "outlet_id") this.outletId,
@JsonKey(name: "outlet_name") this.outletName,
@JsonKey(name: "generated_at") this.generatedAt,
}) : super._();
factory _$InventoryAnalyticSummaryDtoImpl.fromJson(
Map<String, dynamic> json,
) => _$$InventoryAnalyticSummaryDtoImplFromJson(json);
@override
@JsonKey(name: "total_products")
final int? totalProducts;
@override
@JsonKey(name: "total_ingredients")
final int? totalIngredients;
@override
@JsonKey(name: "total_value")
final int? totalValue;
@override
@JsonKey(name: "low_stock_products")
final int? lowStockProducts;
@override
@JsonKey(name: "low_stock_ingredients")
final int? lowStockIngredients;
@override
@JsonKey(name: "zero_stock_products")
final int? zeroStockProducts;
@override
@JsonKey(name: "zero_stock_ingredients")
final int? zeroStockIngredients;
@override
@JsonKey(name: "total_sold_products")
final int? totalSoldProducts;
@override
@JsonKey(name: "total_sold_ingredients")
final int? totalSoldIngredients;
@override
@JsonKey(name: "outlet_id")
final String? outletId;
@override
@JsonKey(name: "outlet_name")
final String? outletName;
@override
@JsonKey(name: "generated_at")
final DateTime? generatedAt;
@override
String toString() {
return 'InventoryAnalyticSummaryDto(totalProducts: $totalProducts, totalIngredients: $totalIngredients, totalValue: $totalValue, lowStockProducts: $lowStockProducts, lowStockIngredients: $lowStockIngredients, zeroStockProducts: $zeroStockProducts, zeroStockIngredients: $zeroStockIngredients, totalSoldProducts: $totalSoldProducts, totalSoldIngredients: $totalSoldIngredients, outletId: $outletId, outletName: $outletName, generatedAt: $generatedAt)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$InventoryAnalyticSummaryDtoImpl &&
(identical(other.totalProducts, totalProducts) ||
other.totalProducts == totalProducts) &&
(identical(other.totalIngredients, totalIngredients) ||
other.totalIngredients == totalIngredients) &&
(identical(other.totalValue, totalValue) ||
other.totalValue == totalValue) &&
(identical(other.lowStockProducts, lowStockProducts) ||
other.lowStockProducts == lowStockProducts) &&
(identical(other.lowStockIngredients, lowStockIngredients) ||
other.lowStockIngredients == lowStockIngredients) &&
(identical(other.zeroStockProducts, zeroStockProducts) ||
other.zeroStockProducts == zeroStockProducts) &&
(identical(other.zeroStockIngredients, zeroStockIngredients) ||
other.zeroStockIngredients == zeroStockIngredients) &&
(identical(other.totalSoldProducts, totalSoldProducts) ||
other.totalSoldProducts == totalSoldProducts) &&
(identical(other.totalSoldIngredients, totalSoldIngredients) ||
other.totalSoldIngredients == totalSoldIngredients) &&
(identical(other.outletId, outletId) ||
other.outletId == outletId) &&
(identical(other.outletName, outletName) ||
other.outletName == outletName) &&
(identical(other.generatedAt, generatedAt) ||
other.generatedAt == generatedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
totalProducts,
totalIngredients,
totalValue,
lowStockProducts,
lowStockIngredients,
zeroStockProducts,
zeroStockIngredients,
totalSoldProducts,
totalSoldIngredients,
outletId,
outletName,
generatedAt,
);
/// Create a copy of InventoryAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$InventoryAnalyticSummaryDtoImplCopyWith<_$InventoryAnalyticSummaryDtoImpl>
get copyWith =>
__$$InventoryAnalyticSummaryDtoImplCopyWithImpl<
_$InventoryAnalyticSummaryDtoImpl
>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$InventoryAnalyticSummaryDtoImplToJson(this);
}
}
abstract class _InventoryAnalyticSummaryDto
extends InventoryAnalyticSummaryDto {
const factory _InventoryAnalyticSummaryDto({
@JsonKey(name: "total_products") final int? totalProducts,
@JsonKey(name: "total_ingredients") final int? totalIngredients,
@JsonKey(name: "total_value") final int? totalValue,
@JsonKey(name: "low_stock_products") final int? lowStockProducts,
@JsonKey(name: "low_stock_ingredients") final int? lowStockIngredients,
@JsonKey(name: "zero_stock_products") final int? zeroStockProducts,
@JsonKey(name: "zero_stock_ingredients") final int? zeroStockIngredients,
@JsonKey(name: "total_sold_products") final int? totalSoldProducts,
@JsonKey(name: "total_sold_ingredients") final int? totalSoldIngredients,
@JsonKey(name: "outlet_id") final String? outletId,
@JsonKey(name: "outlet_name") final String? outletName,
@JsonKey(name: "generated_at") final DateTime? generatedAt,
}) = _$InventoryAnalyticSummaryDtoImpl;
const _InventoryAnalyticSummaryDto._() : super._();
factory _InventoryAnalyticSummaryDto.fromJson(Map<String, dynamic> json) =
_$InventoryAnalyticSummaryDtoImpl.fromJson;
@override
@JsonKey(name: "total_products")
int? get totalProducts;
@override
@JsonKey(name: "total_ingredients")
int? get totalIngredients;
@override
@JsonKey(name: "total_value")
int? get totalValue;
@override
@JsonKey(name: "low_stock_products")
int? get lowStockProducts;
@override
@JsonKey(name: "low_stock_ingredients")
int? get lowStockIngredients;
@override
@JsonKey(name: "zero_stock_products")
int? get zeroStockProducts;
@override
@JsonKey(name: "zero_stock_ingredients")
int? get zeroStockIngredients;
@override
@JsonKey(name: "total_sold_products")
int? get totalSoldProducts;
@override
@JsonKey(name: "total_sold_ingredients")
int? get totalSoldIngredients;
@override
@JsonKey(name: "outlet_id")
String? get outletId;
@override
@JsonKey(name: "outlet_name")
String? get outletName;
@override
@JsonKey(name: "generated_at")
DateTime? get generatedAt;
/// Create a copy of InventoryAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$InventoryAnalyticSummaryDtoImplCopyWith<_$InventoryAnalyticSummaryDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}
InventoryAnalyticProductItemDto _$InventoryAnalyticProductItemDtoFromJson(
Map<String, dynamic> json,
) {
return _InventoryAnalyticProductItemDto.fromJson(json);
}
/// @nodoc
mixin _$InventoryAnalyticProductItemDto {
@JsonKey(name: "id")
String? get id => throw _privateConstructorUsedError;
@JsonKey(name: "product_id")
String? get productId => throw _privateConstructorUsedError;
@JsonKey(name: "product_name")
String? get productName => throw _privateConstructorUsedError;
@JsonKey(name: "category_name")
String? get categoryName => throw _privateConstructorUsedError;
@JsonKey(name: "quantity")
int? get quantity => throw _privateConstructorUsedError;
@JsonKey(name: "reorder_level")
int? get reorderLevel => throw _privateConstructorUsedError;
@JsonKey(name: "unit_cost")
num? get unitCost => throw _privateConstructorUsedError;
@JsonKey(name: "total_value")
int? get totalValue => throw _privateConstructorUsedError;
@JsonKey(name: "total_in")
int? get totalIn => throw _privateConstructorUsedError;
@JsonKey(name: "total_out")
int? get totalOut => throw _privateConstructorUsedError;
@JsonKey(name: "is_low_stock")
bool? get isLowStock => throw _privateConstructorUsedError;
@JsonKey(name: "is_zero_stock")
bool? get isZeroStock => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
DateTime? get updatedAt => throw _privateConstructorUsedError;
/// Serializes this InventoryAnalyticProductItemDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of InventoryAnalyticProductItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$InventoryAnalyticProductItemDtoCopyWith<InventoryAnalyticProductItemDto>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $InventoryAnalyticProductItemDtoCopyWith<$Res> {
factory $InventoryAnalyticProductItemDtoCopyWith(
InventoryAnalyticProductItemDto value,
$Res Function(InventoryAnalyticProductItemDto) then,
) =
_$InventoryAnalyticProductItemDtoCopyWithImpl<
$Res,
InventoryAnalyticProductItemDto
>;
@useResult
$Res call({
@JsonKey(name: "id") String? id,
@JsonKey(name: "product_id") String? productId,
@JsonKey(name: "product_name") String? productName,
@JsonKey(name: "category_name") String? categoryName,
@JsonKey(name: "quantity") int? quantity,
@JsonKey(name: "reorder_level") int? reorderLevel,
@JsonKey(name: "unit_cost") num? unitCost,
@JsonKey(name: "total_value") int? totalValue,
@JsonKey(name: "total_in") int? totalIn,
@JsonKey(name: "total_out") int? totalOut,
@JsonKey(name: "is_low_stock") bool? isLowStock,
@JsonKey(name: "is_zero_stock") bool? isZeroStock,
@JsonKey(name: "updated_at") DateTime? updatedAt,
});
}
/// @nodoc
class _$InventoryAnalyticProductItemDtoCopyWithImpl<
$Res,
$Val extends InventoryAnalyticProductItemDto
>
implements $InventoryAnalyticProductItemDtoCopyWith<$Res> {
_$InventoryAnalyticProductItemDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of InventoryAnalyticProductItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = freezed,
Object? productId = freezed,
Object? productName = freezed,
Object? categoryName = freezed,
Object? quantity = freezed,
Object? reorderLevel = freezed,
Object? unitCost = freezed,
Object? totalValue = freezed,
Object? totalIn = freezed,
Object? totalOut = freezed,
Object? isLowStock = freezed,
Object? isZeroStock = freezed,
Object? updatedAt = freezed,
}) {
return _then(
_value.copyWith(
id: freezed == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String?,
productId: freezed == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String?,
productName: freezed == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String?,
categoryName: freezed == categoryName
? _value.categoryName
: categoryName // ignore: cast_nullable_to_non_nullable
as String?,
quantity: freezed == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int?,
reorderLevel: freezed == reorderLevel
? _value.reorderLevel
: reorderLevel // ignore: cast_nullable_to_non_nullable
as int?,
unitCost: freezed == unitCost
? _value.unitCost
: unitCost // ignore: cast_nullable_to_non_nullable
as num?,
totalValue: freezed == totalValue
? _value.totalValue
: totalValue // ignore: cast_nullable_to_non_nullable
as int?,
totalIn: freezed == totalIn
? _value.totalIn
: totalIn // ignore: cast_nullable_to_non_nullable
as int?,
totalOut: freezed == totalOut
? _value.totalOut
: totalOut // ignore: cast_nullable_to_non_nullable
as int?,
isLowStock: freezed == isLowStock
? _value.isLowStock
: isLowStock // ignore: cast_nullable_to_non_nullable
as bool?,
isZeroStock: freezed == isZeroStock
? _value.isZeroStock
: isZeroStock // ignore: cast_nullable_to_non_nullable
as bool?,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$InventoryAnalyticProductItemDtoImplCopyWith<$Res>
implements $InventoryAnalyticProductItemDtoCopyWith<$Res> {
factory _$$InventoryAnalyticProductItemDtoImplCopyWith(
_$InventoryAnalyticProductItemDtoImpl value,
$Res Function(_$InventoryAnalyticProductItemDtoImpl) then,
) = __$$InventoryAnalyticProductItemDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "id") String? id,
@JsonKey(name: "product_id") String? productId,
@JsonKey(name: "product_name") String? productName,
@JsonKey(name: "category_name") String? categoryName,
@JsonKey(name: "quantity") int? quantity,
@JsonKey(name: "reorder_level") int? reorderLevel,
@JsonKey(name: "unit_cost") num? unitCost,
@JsonKey(name: "total_value") int? totalValue,
@JsonKey(name: "total_in") int? totalIn,
@JsonKey(name: "total_out") int? totalOut,
@JsonKey(name: "is_low_stock") bool? isLowStock,
@JsonKey(name: "is_zero_stock") bool? isZeroStock,
@JsonKey(name: "updated_at") DateTime? updatedAt,
});
}
/// @nodoc
class __$$InventoryAnalyticProductItemDtoImplCopyWithImpl<$Res>
extends
_$InventoryAnalyticProductItemDtoCopyWithImpl<
$Res,
_$InventoryAnalyticProductItemDtoImpl
>
implements _$$InventoryAnalyticProductItemDtoImplCopyWith<$Res> {
__$$InventoryAnalyticProductItemDtoImplCopyWithImpl(
_$InventoryAnalyticProductItemDtoImpl _value,
$Res Function(_$InventoryAnalyticProductItemDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of InventoryAnalyticProductItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = freezed,
Object? productId = freezed,
Object? productName = freezed,
Object? categoryName = freezed,
Object? quantity = freezed,
Object? reorderLevel = freezed,
Object? unitCost = freezed,
Object? totalValue = freezed,
Object? totalIn = freezed,
Object? totalOut = freezed,
Object? isLowStock = freezed,
Object? isZeroStock = freezed,
Object? updatedAt = freezed,
}) {
return _then(
_$InventoryAnalyticProductItemDtoImpl(
id: freezed == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String?,
productId: freezed == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String?,
productName: freezed == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String?,
categoryName: freezed == categoryName
? _value.categoryName
: categoryName // ignore: cast_nullable_to_non_nullable
as String?,
quantity: freezed == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int?,
reorderLevel: freezed == reorderLevel
? _value.reorderLevel
: reorderLevel // ignore: cast_nullable_to_non_nullable
as int?,
unitCost: freezed == unitCost
? _value.unitCost
: unitCost // ignore: cast_nullable_to_non_nullable
as num?,
totalValue: freezed == totalValue
? _value.totalValue
: totalValue // ignore: cast_nullable_to_non_nullable
as int?,
totalIn: freezed == totalIn
? _value.totalIn
: totalIn // ignore: cast_nullable_to_non_nullable
as int?,
totalOut: freezed == totalOut
? _value.totalOut
: totalOut // ignore: cast_nullable_to_non_nullable
as int?,
isLowStock: freezed == isLowStock
? _value.isLowStock
: isLowStock // ignore: cast_nullable_to_non_nullable
as bool?,
isZeroStock: freezed == isZeroStock
? _value.isZeroStock
: isZeroStock // ignore: cast_nullable_to_non_nullable
as bool?,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$InventoryAnalyticProductItemDtoImpl
extends _InventoryAnalyticProductItemDto {
const _$InventoryAnalyticProductItemDtoImpl({
@JsonKey(name: "id") this.id,
@JsonKey(name: "product_id") this.productId,
@JsonKey(name: "product_name") this.productName,
@JsonKey(name: "category_name") this.categoryName,
@JsonKey(name: "quantity") this.quantity,
@JsonKey(name: "reorder_level") this.reorderLevel,
@JsonKey(name: "unit_cost") this.unitCost,
@JsonKey(name: "total_value") this.totalValue,
@JsonKey(name: "total_in") this.totalIn,
@JsonKey(name: "total_out") this.totalOut,
@JsonKey(name: "is_low_stock") this.isLowStock,
@JsonKey(name: "is_zero_stock") this.isZeroStock,
@JsonKey(name: "updated_at") this.updatedAt,
}) : super._();
factory _$InventoryAnalyticProductItemDtoImpl.fromJson(
Map<String, dynamic> json,
) => _$$InventoryAnalyticProductItemDtoImplFromJson(json);
@override
@JsonKey(name: "id")
final String? id;
@override
@JsonKey(name: "product_id")
final String? productId;
@override
@JsonKey(name: "product_name")
final String? productName;
@override
@JsonKey(name: "category_name")
final String? categoryName;
@override
@JsonKey(name: "quantity")
final int? quantity;
@override
@JsonKey(name: "reorder_level")
final int? reorderLevel;
@override
@JsonKey(name: "unit_cost")
final num? unitCost;
@override
@JsonKey(name: "total_value")
final int? totalValue;
@override
@JsonKey(name: "total_in")
final int? totalIn;
@override
@JsonKey(name: "total_out")
final int? totalOut;
@override
@JsonKey(name: "is_low_stock")
final bool? isLowStock;
@override
@JsonKey(name: "is_zero_stock")
final bool? isZeroStock;
@override
@JsonKey(name: "updated_at")
final DateTime? updatedAt;
@override
String toString() {
return 'InventoryAnalyticProductItemDto(id: $id, productId: $productId, productName: $productName, categoryName: $categoryName, quantity: $quantity, reorderLevel: $reorderLevel, unitCost: $unitCost, totalValue: $totalValue, totalIn: $totalIn, totalOut: $totalOut, isLowStock: $isLowStock, isZeroStock: $isZeroStock, updatedAt: $updatedAt)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$InventoryAnalyticProductItemDtoImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.productId, productId) ||
other.productId == productId) &&
(identical(other.productName, productName) ||
other.productName == productName) &&
(identical(other.categoryName, categoryName) ||
other.categoryName == categoryName) &&
(identical(other.quantity, quantity) ||
other.quantity == quantity) &&
(identical(other.reorderLevel, reorderLevel) ||
other.reorderLevel == reorderLevel) &&
(identical(other.unitCost, unitCost) ||
other.unitCost == unitCost) &&
(identical(other.totalValue, totalValue) ||
other.totalValue == totalValue) &&
(identical(other.totalIn, totalIn) || other.totalIn == totalIn) &&
(identical(other.totalOut, totalOut) ||
other.totalOut == totalOut) &&
(identical(other.isLowStock, isLowStock) ||
other.isLowStock == isLowStock) &&
(identical(other.isZeroStock, isZeroStock) ||
other.isZeroStock == isZeroStock) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
productId,
productName,
categoryName,
quantity,
reorderLevel,
unitCost,
totalValue,
totalIn,
totalOut,
isLowStock,
isZeroStock,
updatedAt,
);
/// Create a copy of InventoryAnalyticProductItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$InventoryAnalyticProductItemDtoImplCopyWith<
_$InventoryAnalyticProductItemDtoImpl
>
get copyWith =>
__$$InventoryAnalyticProductItemDtoImplCopyWithImpl<
_$InventoryAnalyticProductItemDtoImpl
>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$InventoryAnalyticProductItemDtoImplToJson(this);
}
}
abstract class _InventoryAnalyticProductItemDto
extends InventoryAnalyticProductItemDto {
const factory _InventoryAnalyticProductItemDto({
@JsonKey(name: "id") final String? id,
@JsonKey(name: "product_id") final String? productId,
@JsonKey(name: "product_name") final String? productName,
@JsonKey(name: "category_name") final String? categoryName,
@JsonKey(name: "quantity") final int? quantity,
@JsonKey(name: "reorder_level") final int? reorderLevel,
@JsonKey(name: "unit_cost") final num? unitCost,
@JsonKey(name: "total_value") final int? totalValue,
@JsonKey(name: "total_in") final int? totalIn,
@JsonKey(name: "total_out") final int? totalOut,
@JsonKey(name: "is_low_stock") final bool? isLowStock,
@JsonKey(name: "is_zero_stock") final bool? isZeroStock,
@JsonKey(name: "updated_at") final DateTime? updatedAt,
}) = _$InventoryAnalyticProductItemDtoImpl;
const _InventoryAnalyticProductItemDto._() : super._();
factory _InventoryAnalyticProductItemDto.fromJson(Map<String, dynamic> json) =
_$InventoryAnalyticProductItemDtoImpl.fromJson;
@override
@JsonKey(name: "id")
String? get id;
@override
@JsonKey(name: "product_id")
String? get productId;
@override
@JsonKey(name: "product_name")
String? get productName;
@override
@JsonKey(name: "category_name")
String? get categoryName;
@override
@JsonKey(name: "quantity")
int? get quantity;
@override
@JsonKey(name: "reorder_level")
int? get reorderLevel;
@override
@JsonKey(name: "unit_cost")
num? get unitCost;
@override
@JsonKey(name: "total_value")
int? get totalValue;
@override
@JsonKey(name: "total_in")
int? get totalIn;
@override
@JsonKey(name: "total_out")
int? get totalOut;
@override
@JsonKey(name: "is_low_stock")
bool? get isLowStock;
@override
@JsonKey(name: "is_zero_stock")
bool? get isZeroStock;
@override
@JsonKey(name: "updated_at")
DateTime? get updatedAt;
/// Create a copy of InventoryAnalyticProductItemDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$InventoryAnalyticProductItemDtoImplCopyWith<
_$InventoryAnalyticProductItemDtoImpl
>
get copyWith => throw _privateConstructorUsedError;
}
InventoryAnalyticIngredientItemDto _$InventoryAnalyticIngredientItemDtoFromJson(
Map<String, dynamic> json,
) {
return _InventoryAnalyticIngredientItemDto.fromJson(json);
}
/// @nodoc
mixin _$InventoryAnalyticIngredientItemDto {
@JsonKey(name: "id")
String? get id => throw _privateConstructorUsedError;
@JsonKey(name: "ingredient_id")
String? get ingredientId => throw _privateConstructorUsedError;
@JsonKey(name: "ingredient_name")
String? get ingredientName => throw _privateConstructorUsedError;
@JsonKey(name: "unit_name")
String? get unitName => throw _privateConstructorUsedError;
@JsonKey(name: "quantity")
int? get quantity => throw _privateConstructorUsedError;
@JsonKey(name: "reorder_level")
int? get reorderLevel => throw _privateConstructorUsedError;
@JsonKey(name: "unit_cost")
num? get unitCost => throw _privateConstructorUsedError;
@JsonKey(name: "total_value")
int? get totalValue => throw _privateConstructorUsedError;
@JsonKey(name: "total_in")
int? get totalIn => throw _privateConstructorUsedError;
@JsonKey(name: "total_out")
int? get totalOut => throw _privateConstructorUsedError;
@JsonKey(name: "is_low_stock")
bool? get isLowStock => throw _privateConstructorUsedError;
@JsonKey(name: "is_zero_stock")
bool? get isZeroStock => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
DateTime? get updatedAt => throw _privateConstructorUsedError;
/// Serializes this InventoryAnalyticIngredientItemDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of InventoryAnalyticIngredientItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$InventoryAnalyticIngredientItemDtoCopyWith<
InventoryAnalyticIngredientItemDto
>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $InventoryAnalyticIngredientItemDtoCopyWith<$Res> {
factory $InventoryAnalyticIngredientItemDtoCopyWith(
InventoryAnalyticIngredientItemDto value,
$Res Function(InventoryAnalyticIngredientItemDto) then,
) =
_$InventoryAnalyticIngredientItemDtoCopyWithImpl<
$Res,
InventoryAnalyticIngredientItemDto
>;
@useResult
$Res call({
@JsonKey(name: "id") String? id,
@JsonKey(name: "ingredient_id") String? ingredientId,
@JsonKey(name: "ingredient_name") String? ingredientName,
@JsonKey(name: "unit_name") String? unitName,
@JsonKey(name: "quantity") int? quantity,
@JsonKey(name: "reorder_level") int? reorderLevel,
@JsonKey(name: "unit_cost") num? unitCost,
@JsonKey(name: "total_value") int? totalValue,
@JsonKey(name: "total_in") int? totalIn,
@JsonKey(name: "total_out") int? totalOut,
@JsonKey(name: "is_low_stock") bool? isLowStock,
@JsonKey(name: "is_zero_stock") bool? isZeroStock,
@JsonKey(name: "updated_at") DateTime? updatedAt,
});
}
/// @nodoc
class _$InventoryAnalyticIngredientItemDtoCopyWithImpl<
$Res,
$Val extends InventoryAnalyticIngredientItemDto
>
implements $InventoryAnalyticIngredientItemDtoCopyWith<$Res> {
_$InventoryAnalyticIngredientItemDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of InventoryAnalyticIngredientItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = freezed,
Object? ingredientId = freezed,
Object? ingredientName = freezed,
Object? unitName = freezed,
Object? quantity = freezed,
Object? reorderLevel = freezed,
Object? unitCost = freezed,
Object? totalValue = freezed,
Object? totalIn = freezed,
Object? totalOut = freezed,
Object? isLowStock = freezed,
Object? isZeroStock = freezed,
Object? updatedAt = freezed,
}) {
return _then(
_value.copyWith(
id: freezed == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String?,
ingredientId: freezed == ingredientId
? _value.ingredientId
: ingredientId // ignore: cast_nullable_to_non_nullable
as String?,
ingredientName: freezed == ingredientName
? _value.ingredientName
: ingredientName // ignore: cast_nullable_to_non_nullable
as String?,
unitName: freezed == unitName
? _value.unitName
: unitName // ignore: cast_nullable_to_non_nullable
as String?,
quantity: freezed == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int?,
reorderLevel: freezed == reorderLevel
? _value.reorderLevel
: reorderLevel // ignore: cast_nullable_to_non_nullable
as int?,
unitCost: freezed == unitCost
? _value.unitCost
: unitCost // ignore: cast_nullable_to_non_nullable
as num?,
totalValue: freezed == totalValue
? _value.totalValue
: totalValue // ignore: cast_nullable_to_non_nullable
as int?,
totalIn: freezed == totalIn
? _value.totalIn
: totalIn // ignore: cast_nullable_to_non_nullable
as int?,
totalOut: freezed == totalOut
? _value.totalOut
: totalOut // ignore: cast_nullable_to_non_nullable
as int?,
isLowStock: freezed == isLowStock
? _value.isLowStock
: isLowStock // ignore: cast_nullable_to_non_nullable
as bool?,
isZeroStock: freezed == isZeroStock
? _value.isZeroStock
: isZeroStock // ignore: cast_nullable_to_non_nullable
as bool?,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$InventoryAnalyticIngredientItemDtoImplCopyWith<$Res>
implements $InventoryAnalyticIngredientItemDtoCopyWith<$Res> {
factory _$$InventoryAnalyticIngredientItemDtoImplCopyWith(
_$InventoryAnalyticIngredientItemDtoImpl value,
$Res Function(_$InventoryAnalyticIngredientItemDtoImpl) then,
) = __$$InventoryAnalyticIngredientItemDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "id") String? id,
@JsonKey(name: "ingredient_id") String? ingredientId,
@JsonKey(name: "ingredient_name") String? ingredientName,
@JsonKey(name: "unit_name") String? unitName,
@JsonKey(name: "quantity") int? quantity,
@JsonKey(name: "reorder_level") int? reorderLevel,
@JsonKey(name: "unit_cost") num? unitCost,
@JsonKey(name: "total_value") int? totalValue,
@JsonKey(name: "total_in") int? totalIn,
@JsonKey(name: "total_out") int? totalOut,
@JsonKey(name: "is_low_stock") bool? isLowStock,
@JsonKey(name: "is_zero_stock") bool? isZeroStock,
@JsonKey(name: "updated_at") DateTime? updatedAt,
});
}
/// @nodoc
class __$$InventoryAnalyticIngredientItemDtoImplCopyWithImpl<$Res>
extends
_$InventoryAnalyticIngredientItemDtoCopyWithImpl<
$Res,
_$InventoryAnalyticIngredientItemDtoImpl
>
implements _$$InventoryAnalyticIngredientItemDtoImplCopyWith<$Res> {
__$$InventoryAnalyticIngredientItemDtoImplCopyWithImpl(
_$InventoryAnalyticIngredientItemDtoImpl _value,
$Res Function(_$InventoryAnalyticIngredientItemDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of InventoryAnalyticIngredientItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = freezed,
Object? ingredientId = freezed,
Object? ingredientName = freezed,
Object? unitName = freezed,
Object? quantity = freezed,
Object? reorderLevel = freezed,
Object? unitCost = freezed,
Object? totalValue = freezed,
Object? totalIn = freezed,
Object? totalOut = freezed,
Object? isLowStock = freezed,
Object? isZeroStock = freezed,
Object? updatedAt = freezed,
}) {
return _then(
_$InventoryAnalyticIngredientItemDtoImpl(
id: freezed == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String?,
ingredientId: freezed == ingredientId
? _value.ingredientId
: ingredientId // ignore: cast_nullable_to_non_nullable
as String?,
ingredientName: freezed == ingredientName
? _value.ingredientName
: ingredientName // ignore: cast_nullable_to_non_nullable
as String?,
unitName: freezed == unitName
? _value.unitName
: unitName // ignore: cast_nullable_to_non_nullable
as String?,
quantity: freezed == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int?,
reorderLevel: freezed == reorderLevel
? _value.reorderLevel
: reorderLevel // ignore: cast_nullable_to_non_nullable
as int?,
unitCost: freezed == unitCost
? _value.unitCost
: unitCost // ignore: cast_nullable_to_non_nullable
as num?,
totalValue: freezed == totalValue
? _value.totalValue
: totalValue // ignore: cast_nullable_to_non_nullable
as int?,
totalIn: freezed == totalIn
? _value.totalIn
: totalIn // ignore: cast_nullable_to_non_nullable
as int?,
totalOut: freezed == totalOut
? _value.totalOut
: totalOut // ignore: cast_nullable_to_non_nullable
as int?,
isLowStock: freezed == isLowStock
? _value.isLowStock
: isLowStock // ignore: cast_nullable_to_non_nullable
as bool?,
isZeroStock: freezed == isZeroStock
? _value.isZeroStock
: isZeroStock // ignore: cast_nullable_to_non_nullable
as bool?,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$InventoryAnalyticIngredientItemDtoImpl
extends _InventoryAnalyticIngredientItemDto {
const _$InventoryAnalyticIngredientItemDtoImpl({
@JsonKey(name: "id") this.id,
@JsonKey(name: "ingredient_id") this.ingredientId,
@JsonKey(name: "ingredient_name") this.ingredientName,
@JsonKey(name: "unit_name") this.unitName,
@JsonKey(name: "quantity") this.quantity,
@JsonKey(name: "reorder_level") this.reorderLevel,
@JsonKey(name: "unit_cost") this.unitCost,
@JsonKey(name: "total_value") this.totalValue,
@JsonKey(name: "total_in") this.totalIn,
@JsonKey(name: "total_out") this.totalOut,
@JsonKey(name: "is_low_stock") this.isLowStock,
@JsonKey(name: "is_zero_stock") this.isZeroStock,
@JsonKey(name: "updated_at") this.updatedAt,
}) : super._();
factory _$InventoryAnalyticIngredientItemDtoImpl.fromJson(
Map<String, dynamic> json,
) => _$$InventoryAnalyticIngredientItemDtoImplFromJson(json);
@override
@JsonKey(name: "id")
final String? id;
@override
@JsonKey(name: "ingredient_id")
final String? ingredientId;
@override
@JsonKey(name: "ingredient_name")
final String? ingredientName;
@override
@JsonKey(name: "unit_name")
final String? unitName;
@override
@JsonKey(name: "quantity")
final int? quantity;
@override
@JsonKey(name: "reorder_level")
final int? reorderLevel;
@override
@JsonKey(name: "unit_cost")
final num? unitCost;
@override
@JsonKey(name: "total_value")
final int? totalValue;
@override
@JsonKey(name: "total_in")
final int? totalIn;
@override
@JsonKey(name: "total_out")
final int? totalOut;
@override
@JsonKey(name: "is_low_stock")
final bool? isLowStock;
@override
@JsonKey(name: "is_zero_stock")
final bool? isZeroStock;
@override
@JsonKey(name: "updated_at")
final DateTime? updatedAt;
@override
String toString() {
return 'InventoryAnalyticIngredientItemDto(id: $id, ingredientId: $ingredientId, ingredientName: $ingredientName, unitName: $unitName, quantity: $quantity, reorderLevel: $reorderLevel, unitCost: $unitCost, totalValue: $totalValue, totalIn: $totalIn, totalOut: $totalOut, isLowStock: $isLowStock, isZeroStock: $isZeroStock, updatedAt: $updatedAt)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$InventoryAnalyticIngredientItemDtoImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.ingredientId, ingredientId) ||
other.ingredientId == ingredientId) &&
(identical(other.ingredientName, ingredientName) ||
other.ingredientName == ingredientName) &&
(identical(other.unitName, unitName) ||
other.unitName == unitName) &&
(identical(other.quantity, quantity) ||
other.quantity == quantity) &&
(identical(other.reorderLevel, reorderLevel) ||
other.reorderLevel == reorderLevel) &&
(identical(other.unitCost, unitCost) ||
other.unitCost == unitCost) &&
(identical(other.totalValue, totalValue) ||
other.totalValue == totalValue) &&
(identical(other.totalIn, totalIn) || other.totalIn == totalIn) &&
(identical(other.totalOut, totalOut) ||
other.totalOut == totalOut) &&
(identical(other.isLowStock, isLowStock) ||
other.isLowStock == isLowStock) &&
(identical(other.isZeroStock, isZeroStock) ||
other.isZeroStock == isZeroStock) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
ingredientId,
ingredientName,
unitName,
quantity,
reorderLevel,
unitCost,
totalValue,
totalIn,
totalOut,
isLowStock,
isZeroStock,
updatedAt,
);
/// Create a copy of InventoryAnalyticIngredientItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$InventoryAnalyticIngredientItemDtoImplCopyWith<
_$InventoryAnalyticIngredientItemDtoImpl
>
get copyWith =>
__$$InventoryAnalyticIngredientItemDtoImplCopyWithImpl<
_$InventoryAnalyticIngredientItemDtoImpl
>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$InventoryAnalyticIngredientItemDtoImplToJson(this);
}
}
abstract class _InventoryAnalyticIngredientItemDto
extends InventoryAnalyticIngredientItemDto {
const factory _InventoryAnalyticIngredientItemDto({
@JsonKey(name: "id") final String? id,
@JsonKey(name: "ingredient_id") final String? ingredientId,
@JsonKey(name: "ingredient_name") final String? ingredientName,
@JsonKey(name: "unit_name") final String? unitName,
@JsonKey(name: "quantity") final int? quantity,
@JsonKey(name: "reorder_level") final int? reorderLevel,
@JsonKey(name: "unit_cost") final num? unitCost,
@JsonKey(name: "total_value") final int? totalValue,
@JsonKey(name: "total_in") final int? totalIn,
@JsonKey(name: "total_out") final int? totalOut,
@JsonKey(name: "is_low_stock") final bool? isLowStock,
@JsonKey(name: "is_zero_stock") final bool? isZeroStock,
@JsonKey(name: "updated_at") final DateTime? updatedAt,
}) = _$InventoryAnalyticIngredientItemDtoImpl;
const _InventoryAnalyticIngredientItemDto._() : super._();
factory _InventoryAnalyticIngredientItemDto.fromJson(
Map<String, dynamic> json,
) = _$InventoryAnalyticIngredientItemDtoImpl.fromJson;
@override
@JsonKey(name: "id")
String? get id;
@override
@JsonKey(name: "ingredient_id")
String? get ingredientId;
@override
@JsonKey(name: "ingredient_name")
String? get ingredientName;
@override
@JsonKey(name: "unit_name")
String? get unitName;
@override
@JsonKey(name: "quantity")
int? get quantity;
@override
@JsonKey(name: "reorder_level")
int? get reorderLevel;
@override
@JsonKey(name: "unit_cost")
num? get unitCost;
@override
@JsonKey(name: "total_value")
int? get totalValue;
@override
@JsonKey(name: "total_in")
int? get totalIn;
@override
@JsonKey(name: "total_out")
int? get totalOut;
@override
@JsonKey(name: "is_low_stock")
bool? get isLowStock;
@override
@JsonKey(name: "is_zero_stock")
bool? get isZeroStock;
@override
@JsonKey(name: "updated_at")
DateTime? get updatedAt;
/// Create a copy of InventoryAnalyticIngredientItemDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$InventoryAnalyticIngredientItemDtoImplCopyWith<
_$InventoryAnalyticIngredientItemDtoImpl
>
get copyWith => throw _privateConstructorUsedError;
}