2025-08-17 10:10:31 +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. \n Please check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models ' ,
) ;
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 ' )
SalesAnalyticSummaryDto ? get summary = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' data ' )
List < SalesAnalyticDataDto > ? 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 ' ) SalesAnalyticSummaryDto ? summary ,
@ JsonKey ( name: ' data ' ) List < SalesAnalyticDataDto > ? data ,
} ) ;
$SalesAnalyticSummaryDtoCopyWith < $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 SalesAnalyticSummaryDto ? ,
data: freezed = = data
? _value . data
: data // ignore: cast_nullable_to_non_nullable
as List < SalesAnalyticDataDto > ? ,
)
as $Val ,
) ;
}
/// Create a copy of SalesAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( ' vm:prefer-inline ' )
$SalesAnalyticSummaryDtoCopyWith < $Res > ? get summary {
if ( _value . summary = = null ) {
return null ;
}
return $SalesAnalyticSummaryDtoCopyWith < $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 ' ) SalesAnalyticSummaryDto ? summary ,
@ JsonKey ( name: ' data ' ) List < SalesAnalyticDataDto > ? data ,
} ) ;
@ override
$SalesAnalyticSummaryDtoCopyWith < $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 SalesAnalyticSummaryDto ? ,
data: freezed = = data
? _value . _data
: data // ignore: cast_nullable_to_non_nullable
as List < SalesAnalyticDataDto > ? ,
) ,
) ;
}
}
/// @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 < SalesAnalyticDataDto > ? 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 SalesAnalyticSummaryDto ? summary ;
final List < SalesAnalyticDataDto > ? _data ;
@ override
@ JsonKey ( name: ' data ' )
List < SalesAnalyticDataDto > ? 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 SalesAnalyticSummaryDto ? summary ,
@ JsonKey ( name: ' data ' ) final List < SalesAnalyticDataDto > ? 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 ' )
SalesAnalyticSummaryDto ? get summary ;
@ override
@ JsonKey ( name: ' data ' )
List < SalesAnalyticDataDto > ? 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 ;
}
SalesAnalyticSummaryDto _ $SalesAnalyticSummaryDtoFromJson (
Map < String , dynamic > json ,
) {
return _SalesAnalyticSummaryDto . fromJson ( json ) ;
}
/// @nodoc
mixin _ $SalesAnalyticSummaryDto {
@ JsonKey ( name: ' total_sales ' )
num ? get totalSales = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' total_orders ' )
num ? get totalOrders = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' total_items ' )
num ? get totalItems = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' average_order_value ' )
num ? get averageOrderValue = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' total_tax ' )
num ? get totalTax = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' total_discount ' )
num ? get totalDiscount = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' net_sales ' )
num ? get netSales = > throw _privateConstructorUsedError ;
/// Serializes this SalesAnalyticSummaryDto to a JSON map.
Map < String , dynamic > toJson ( ) = > throw _privateConstructorUsedError ;
/// Create a copy of SalesAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$SalesAnalyticSummaryDtoCopyWith < SalesAnalyticSummaryDto > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $SalesAnalyticSummaryDtoCopyWith < $Res > {
factory $SalesAnalyticSummaryDtoCopyWith (
SalesAnalyticSummaryDto value ,
$Res Function ( SalesAnalyticSummaryDto ) then ,
) = _ $SalesAnalyticSummaryDtoCopyWithImpl < $Res , SalesAnalyticSummaryDto > ;
@ useResult
$Res call ( {
@ JsonKey ( name: ' total_sales ' ) num ? totalSales ,
@ JsonKey ( name: ' total_orders ' ) num ? totalOrders ,
@ JsonKey ( name: ' total_items ' ) num ? totalItems ,
@ JsonKey ( name: ' average_order_value ' ) num ? averageOrderValue ,
@ JsonKey ( name: ' total_tax ' ) num ? totalTax ,
@ JsonKey ( name: ' total_discount ' ) num ? totalDiscount ,
@ JsonKey ( name: ' net_sales ' ) num ? netSales ,
} ) ;
}
/// @nodoc
class _ $SalesAnalyticSummaryDtoCopyWithImpl <
$Res ,
$Val extends SalesAnalyticSummaryDto
>
implements $SalesAnalyticSummaryDtoCopyWith < $Res > {
_ $SalesAnalyticSummaryDtoCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of SalesAnalyticSummaryDto
/// 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 num ? ,
totalOrders: freezed = = totalOrders
? _value . totalOrders
: totalOrders // ignore: cast_nullable_to_non_nullable
as num ? ,
totalItems: freezed = = totalItems
? _value . totalItems
: totalItems // ignore: cast_nullable_to_non_nullable
as num ? ,
averageOrderValue: freezed = = averageOrderValue
? _value . averageOrderValue
: averageOrderValue // ignore: cast_nullable_to_non_nullable
as num ? ,
totalTax: freezed = = totalTax
? _value . totalTax
: totalTax // ignore: cast_nullable_to_non_nullable
as num ? ,
totalDiscount: freezed = = totalDiscount
? _value . totalDiscount
: totalDiscount // ignore: cast_nullable_to_non_nullable
as num ? ,
netSales: freezed = = netSales
? _value . netSales
: netSales // ignore: cast_nullable_to_non_nullable
as num ? ,
)
as $Val ,
) ;
}
}
/// @nodoc
abstract class _ $ $SalesAnalyticSummaryDtoImplCopyWith < $Res >
implements $SalesAnalyticSummaryDtoCopyWith < $Res > {
factory _ $ $SalesAnalyticSummaryDtoImplCopyWith (
_ $SalesAnalyticSummaryDtoImpl value ,
$Res Function ( _ $SalesAnalyticSummaryDtoImpl ) then ,
) = __ $ $SalesAnalyticSummaryDtoImplCopyWithImpl < $Res > ;
@ override
@ useResult
$Res call ( {
@ JsonKey ( name: ' total_sales ' ) num ? totalSales ,
@ JsonKey ( name: ' total_orders ' ) num ? totalOrders ,
@ JsonKey ( name: ' total_items ' ) num ? totalItems ,
@ JsonKey ( name: ' average_order_value ' ) num ? averageOrderValue ,
@ JsonKey ( name: ' total_tax ' ) num ? totalTax ,
@ JsonKey ( name: ' total_discount ' ) num ? totalDiscount ,
@ JsonKey ( name: ' net_sales ' ) num ? netSales ,
} ) ;
}
/// @nodoc
class __ $ $SalesAnalyticSummaryDtoImplCopyWithImpl < $Res >
extends
_ $SalesAnalyticSummaryDtoCopyWithImpl <
$Res ,
_ $SalesAnalyticSummaryDtoImpl
>
implements _ $ $SalesAnalyticSummaryDtoImplCopyWith < $Res > {
__ $ $SalesAnalyticSummaryDtoImplCopyWithImpl (
_ $SalesAnalyticSummaryDtoImpl _value ,
$Res Function ( _ $SalesAnalyticSummaryDtoImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of SalesAnalyticSummaryDto
/// 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 (
_ $SalesAnalyticSummaryDtoImpl (
totalSales: freezed = = totalSales
? _value . totalSales
: totalSales // ignore: cast_nullable_to_non_nullable
as num ? ,
totalOrders: freezed = = totalOrders
? _value . totalOrders
: totalOrders // ignore: cast_nullable_to_non_nullable
as num ? ,
totalItems: freezed = = totalItems
? _value . totalItems
: totalItems // ignore: cast_nullable_to_non_nullable
as num ? ,
averageOrderValue: freezed = = averageOrderValue
? _value . averageOrderValue
: averageOrderValue // ignore: cast_nullable_to_non_nullable
as num ? ,
totalTax: freezed = = totalTax
? _value . totalTax
: totalTax // ignore: cast_nullable_to_non_nullable
as num ? ,
totalDiscount: freezed = = totalDiscount
? _value . totalDiscount
: totalDiscount // ignore: cast_nullable_to_non_nullable
as num ? ,
netSales: freezed = = netSales
? _value . netSales
: netSales // ignore: cast_nullable_to_non_nullable
as num ? ,
) ,
) ;
}
}
/// @nodoc
@ JsonSerializable ( )
class _ $SalesAnalyticSummaryDtoImpl extends _SalesAnalyticSummaryDto {
const _ $SalesAnalyticSummaryDtoImpl ( {
@ 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 _ $SalesAnalyticSummaryDtoImpl . fromJson ( Map < String , dynamic > json ) = >
_ $ $SalesAnalyticSummaryDtoImplFromJson ( json ) ;
@ override
@ JsonKey ( name: ' total_sales ' )
final num ? totalSales ;
@ override
@ JsonKey ( name: ' total_orders ' )
final num ? totalOrders ;
@ override
@ JsonKey ( name: ' total_items ' )
final num ? totalItems ;
@ override
@ JsonKey ( name: ' average_order_value ' )
final num ? averageOrderValue ;
@ override
@ JsonKey ( name: ' total_tax ' )
final num ? totalTax ;
@ override
@ JsonKey ( name: ' total_discount ' )
final num ? totalDiscount ;
@ override
@ JsonKey ( name: ' net_sales ' )
final num ? netSales ;
@ override
String toString ( ) {
return ' SalesAnalyticSummaryDto(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 _ $SalesAnalyticSummaryDtoImpl & &
( 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 SalesAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $SalesAnalyticSummaryDtoImplCopyWith < _ $SalesAnalyticSummaryDtoImpl >
get copyWith = >
__ $ $SalesAnalyticSummaryDtoImplCopyWithImpl <
_ $SalesAnalyticSummaryDtoImpl
> ( this , _ $identity ) ;
@ override
Map < String , dynamic > toJson ( ) {
return _ $ $SalesAnalyticSummaryDtoImplToJson ( this ) ;
}
}
abstract class _SalesAnalyticSummaryDto extends SalesAnalyticSummaryDto {
const factory _SalesAnalyticSummaryDto ( {
@ JsonKey ( name: ' total_sales ' ) final num ? totalSales ,
@ JsonKey ( name: ' total_orders ' ) final num ? totalOrders ,
@ JsonKey ( name: ' total_items ' ) final num ? totalItems ,
@ JsonKey ( name: ' average_order_value ' ) final num ? averageOrderValue ,
@ JsonKey ( name: ' total_tax ' ) final num ? totalTax ,
@ JsonKey ( name: ' total_discount ' ) final num ? totalDiscount ,
@ JsonKey ( name: ' net_sales ' ) final num ? netSales ,
} ) = _ $SalesAnalyticSummaryDtoImpl ;
const _SalesAnalyticSummaryDto . _ ( ) : super . _ ( ) ;
factory _SalesAnalyticSummaryDto . fromJson ( Map < String , dynamic > json ) =
_ $SalesAnalyticSummaryDtoImpl . fromJson ;
@ override
@ JsonKey ( name: ' total_sales ' )
num ? get totalSales ;
@ override
@ JsonKey ( name: ' total_orders ' )
num ? get totalOrders ;
@ override
@ JsonKey ( name: ' total_items ' )
num ? get totalItems ;
@ override
@ JsonKey ( name: ' average_order_value ' )
num ? get averageOrderValue ;
@ override
@ JsonKey ( name: ' total_tax ' )
num ? get totalTax ;
@ override
@ JsonKey ( name: ' total_discount ' )
num ? get totalDiscount ;
@ override
@ JsonKey ( name: ' net_sales ' )
num ? get netSales ;
/// Create a copy of SalesAnalyticSummaryDto
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $SalesAnalyticSummaryDtoImplCopyWith < _ $SalesAnalyticSummaryDtoImpl >
get copyWith = > throw _privateConstructorUsedError ;
}
SalesAnalyticDataDto _ $SalesAnalyticDataDtoFromJson ( Map < String , dynamic > json ) {
return _SalesAnalyticDataDto . fromJson ( json ) ;
}
/// @nodoc
mixin _ $SalesAnalyticDataDto {
@ JsonKey ( name: ' date ' )
DateTime ? get date = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' sales ' )
num ? get sales = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' orders ' )
num ? get orders = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' items ' )
num ? get items = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' tax ' )
num ? get tax = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' discount ' )
num ? get discount = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' net_sales ' )
num ? get netSales = > throw _privateConstructorUsedError ;
/// Serializes this SalesAnalyticDataDto to a JSON map.
Map < String , dynamic > toJson ( ) = > throw _privateConstructorUsedError ;
/// Create a copy of SalesAnalyticDataDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$SalesAnalyticDataDtoCopyWith < SalesAnalyticDataDto > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $SalesAnalyticDataDtoCopyWith < $Res > {
factory $SalesAnalyticDataDtoCopyWith (
SalesAnalyticDataDto value ,
$Res Function ( SalesAnalyticDataDto ) then ,
) = _ $SalesAnalyticDataDtoCopyWithImpl < $Res , SalesAnalyticDataDto > ;
@ useResult
$Res call ( {
@ JsonKey ( name: ' date ' ) DateTime ? date ,
@ JsonKey ( name: ' sales ' ) num ? sales ,
@ JsonKey ( name: ' orders ' ) num ? orders ,
@ JsonKey ( name: ' items ' ) num ? items ,
@ JsonKey ( name: ' tax ' ) num ? tax ,
@ JsonKey ( name: ' discount ' ) num ? discount ,
@ JsonKey ( name: ' net_sales ' ) num ? netSales ,
} ) ;
}
/// @nodoc
class _ $SalesAnalyticDataDtoCopyWithImpl <
$Res ,
$Val extends SalesAnalyticDataDto
>
implements $SalesAnalyticDataDtoCopyWith < $Res > {
_ $SalesAnalyticDataDtoCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of SalesAnalyticDataDto
/// 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 num ? ,
orders: freezed = = orders
? _value . orders
: orders // ignore: cast_nullable_to_non_nullable
as num ? ,
items: freezed = = items
? _value . items
: items // ignore: cast_nullable_to_non_nullable
as num ? ,
tax: freezed = = tax
? _value . tax
: tax // ignore: cast_nullable_to_non_nullable
as num ? ,
discount: freezed = = discount
? _value . discount
: discount // ignore: cast_nullable_to_non_nullable
as num ? ,
netSales: freezed = = netSales
? _value . netSales
: netSales // ignore: cast_nullable_to_non_nullable
as num ? ,
)
as $Val ,
) ;
}
}
/// @nodoc
abstract class _ $ $SalesAnalyticDataDtoImplCopyWith < $Res >
implements $SalesAnalyticDataDtoCopyWith < $Res > {
factory _ $ $SalesAnalyticDataDtoImplCopyWith (
_ $SalesAnalyticDataDtoImpl value ,
$Res Function ( _ $SalesAnalyticDataDtoImpl ) then ,
) = __ $ $SalesAnalyticDataDtoImplCopyWithImpl < $Res > ;
@ override
@ useResult
$Res call ( {
@ JsonKey ( name: ' date ' ) DateTime ? date ,
@ JsonKey ( name: ' sales ' ) num ? sales ,
@ JsonKey ( name: ' orders ' ) num ? orders ,
@ JsonKey ( name: ' items ' ) num ? items ,
@ JsonKey ( name: ' tax ' ) num ? tax ,
@ JsonKey ( name: ' discount ' ) num ? discount ,
@ JsonKey ( name: ' net_sales ' ) num ? netSales ,
} ) ;
}
/// @nodoc
class __ $ $SalesAnalyticDataDtoImplCopyWithImpl < $Res >
extends _ $SalesAnalyticDataDtoCopyWithImpl < $Res , _ $SalesAnalyticDataDtoImpl >
implements _ $ $SalesAnalyticDataDtoImplCopyWith < $Res > {
__ $ $SalesAnalyticDataDtoImplCopyWithImpl (
_ $SalesAnalyticDataDtoImpl _value ,
$Res Function ( _ $SalesAnalyticDataDtoImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of SalesAnalyticDataDto
/// 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 (
_ $SalesAnalyticDataDtoImpl (
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 num ? ,
orders: freezed = = orders
? _value . orders
: orders // ignore: cast_nullable_to_non_nullable
as num ? ,
items: freezed = = items
? _value . items
: items // ignore: cast_nullable_to_non_nullable
as num ? ,
tax: freezed = = tax
? _value . tax
: tax // ignore: cast_nullable_to_non_nullable
as num ? ,
discount: freezed = = discount
? _value . discount
: discount // ignore: cast_nullable_to_non_nullable
as num ? ,
netSales: freezed = = netSales
? _value . netSales
: netSales // ignore: cast_nullable_to_non_nullable
as num ? ,
) ,
) ;
}
}
/// @nodoc
@ JsonSerializable ( )
class _ $SalesAnalyticDataDtoImpl extends _SalesAnalyticDataDto {
const _ $SalesAnalyticDataDtoImpl ( {
@ 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 _ $SalesAnalyticDataDtoImpl . fromJson ( Map < String , dynamic > json ) = >
_ $ $SalesAnalyticDataDtoImplFromJson ( json ) ;
@ override
@ JsonKey ( name: ' date ' )
final DateTime ? date ;
@ override
@ JsonKey ( name: ' sales ' )
final num ? sales ;
@ override
@ JsonKey ( name: ' orders ' )
final num ? orders ;
@ override
@ JsonKey ( name: ' items ' )
final num ? items ;
@ override
@ JsonKey ( name: ' tax ' )
final num ? tax ;
@ override
@ JsonKey ( name: ' discount ' )
final num ? discount ;
@ override
@ JsonKey ( name: ' net_sales ' )
final num ? netSales ;
@ override
String toString ( ) {
return ' SalesAnalyticDataDto(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 _ $SalesAnalyticDataDtoImpl & &
( 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 SalesAnalyticDataDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $SalesAnalyticDataDtoImplCopyWith < _ $SalesAnalyticDataDtoImpl >
get copyWith = >
__ $ $SalesAnalyticDataDtoImplCopyWithImpl < _ $SalesAnalyticDataDtoImpl > (
this ,
_ $identity ,
) ;
@ override
Map < String , dynamic > toJson ( ) {
return _ $ $SalesAnalyticDataDtoImplToJson ( this ) ;
}
}
abstract class _SalesAnalyticDataDto extends SalesAnalyticDataDto {
const factory _SalesAnalyticDataDto ( {
@ JsonKey ( name: ' date ' ) final DateTime ? date ,
@ JsonKey ( name: ' sales ' ) final num ? sales ,
@ JsonKey ( name: ' orders ' ) final num ? orders ,
@ JsonKey ( name: ' items ' ) final num ? items ,
@ JsonKey ( name: ' tax ' ) final num ? tax ,
@ JsonKey ( name: ' discount ' ) final num ? discount ,
@ JsonKey ( name: ' net_sales ' ) final num ? netSales ,
} ) = _ $SalesAnalyticDataDtoImpl ;
const _SalesAnalyticDataDto . _ ( ) : super . _ ( ) ;
factory _SalesAnalyticDataDto . fromJson ( Map < String , dynamic > json ) =
_ $SalesAnalyticDataDtoImpl . fromJson ;
@ override
@ JsonKey ( name: ' date ' )
DateTime ? get date ;
@ override
@ JsonKey ( name: ' sales ' )
num ? get sales ;
@ override
@ JsonKey ( name: ' orders ' )
num ? get orders ;
@ override
@ JsonKey ( name: ' items ' )
num ? get items ;
@ override
@ JsonKey ( name: ' tax ' )
num ? get tax ;
@ override
@ JsonKey ( name: ' discount ' )
num ? get discount ;
@ override
@ JsonKey ( name: ' net_sales ' )
num ? get netSales ;
/// Create a copy of SalesAnalyticDataDto
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $SalesAnalyticDataDtoImplCopyWith < _ $SalesAnalyticDataDtoImpl >
get copyWith = > throw _privateConstructorUsedError ;
}
2025-08-17 22:36:46 +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 ' )
ProfitLossSummaryDto ? get summary = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' data ' )
List < ProfitLossDailyDataDto > ? get data = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' product_data ' )
List < ProfitLossProductDataDto > ? 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 ' ) ProfitLossSummaryDto ? summary ,
@ JsonKey ( name: ' data ' ) List < ProfitLossDailyDataDto > ? data ,
@ JsonKey ( name: ' product_data ' ) List < ProfitLossProductDataDto > ? productData ,
} ) ;
$ProfitLossSummaryDtoCopyWith < $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 ProfitLossSummaryDto ? ,
data: freezed = = data
? _value . data
: data // ignore: cast_nullable_to_non_nullable
as List < ProfitLossDailyDataDto > ? ,
productData: freezed = = productData
? _value . productData
: productData // ignore: cast_nullable_to_non_nullable
as List < ProfitLossProductDataDto > ? ,
)
as $Val ,
) ;
}
/// Create a copy of ProfitLossAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( ' vm:prefer-inline ' )
$ProfitLossSummaryDtoCopyWith < $Res > ? get summary {
if ( _value . summary = = null ) {
return null ;
}
return $ProfitLossSummaryDtoCopyWith < $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 ' ) ProfitLossSummaryDto ? summary ,
@ JsonKey ( name: ' data ' ) List < ProfitLossDailyDataDto > ? data ,
@ JsonKey ( name: ' product_data ' ) List < ProfitLossProductDataDto > ? productData ,
} ) ;
@ override
$ProfitLossSummaryDtoCopyWith < $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 ProfitLossSummaryDto ? ,
data: freezed = = data
? _value . _data
: data // ignore: cast_nullable_to_non_nullable
as List < ProfitLossDailyDataDto > ? ,
productData: freezed = = productData
? _value . _productData
: productData // ignore: cast_nullable_to_non_nullable
as List < ProfitLossProductDataDto > ? ,
) ,
) ;
}
}
/// @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 < ProfitLossDailyDataDto > ? data ,
@ JsonKey ( name: ' product_data ' )
final List < ProfitLossProductDataDto > ? 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 ProfitLossSummaryDto ? summary ;
final List < ProfitLossDailyDataDto > ? _data ;
@ override
@ JsonKey ( name: ' data ' )
List < ProfitLossDailyDataDto > ? 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 < ProfitLossProductDataDto > ? _productData ;
@ override
@ JsonKey ( name: ' product_data ' )
List < ProfitLossProductDataDto > ? 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 ProfitLossSummaryDto ? summary ,
@ JsonKey ( name: ' data ' ) final List < ProfitLossDailyDataDto > ? data ,
@ JsonKey ( name: ' product_data ' )
final List < ProfitLossProductDataDto > ? 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 ' )
ProfitLossSummaryDto ? get summary ;
@ override
@ JsonKey ( name: ' data ' )
List < ProfitLossDailyDataDto > ? get data ;
@ override
@ JsonKey ( name: ' product_data ' )
List < ProfitLossProductDataDto > ? 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 ;
}
ProfitLossSummaryDto _ $ProfitLossSummaryDtoFromJson ( Map < String , dynamic > json ) {
return _ProfitLossSummaryDto . fromJson ( json ) ;
}
/// @nodoc
mixin _ $ProfitLossSummaryDto {
@ JsonKey ( name: ' total_revenue ' )
int ? get totalRevenue = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' total_cost ' )
int ? get totalCost = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' gross_profit ' )
int ? 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 ' )
int ? 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 ProfitLossSummaryDto to a JSON map.
Map < String , dynamic > toJson ( ) = > throw _privateConstructorUsedError ;
/// Create a copy of ProfitLossSummaryDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$ProfitLossSummaryDtoCopyWith < ProfitLossSummaryDto > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $ProfitLossSummaryDtoCopyWith < $Res > {
factory $ProfitLossSummaryDtoCopyWith (
ProfitLossSummaryDto value ,
$Res Function ( ProfitLossSummaryDto ) then ,
) = _ $ProfitLossSummaryDtoCopyWithImpl < $Res , ProfitLossSummaryDto > ;
@ useResult
$Res call ( {
@ JsonKey ( name: ' total_revenue ' ) int ? totalRevenue ,
@ JsonKey ( name: ' total_cost ' ) int ? totalCost ,
@ JsonKey ( name: ' gross_profit ' ) int ? grossProfit ,
@ JsonKey ( name: ' gross_profit_margin ' ) double ? grossProfitMargin ,
@ JsonKey ( name: ' total_tax ' ) int ? totalTax ,
@ JsonKey ( name: ' total_discount ' ) int ? totalDiscount ,
@ JsonKey ( name: ' net_profit ' ) int ? 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 _ $ProfitLossSummaryDtoCopyWithImpl <
$Res ,
$Val extends ProfitLossSummaryDto
>
implements $ProfitLossSummaryDtoCopyWith < $Res > {
_ $ProfitLossSummaryDtoCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of ProfitLossSummaryDto
/// 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 int ? ,
grossProfit: freezed = = grossProfit
? _value . grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as int ? ,
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 int ? ,
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 _ $ $ProfitLossSummaryDtoImplCopyWith < $Res >
implements $ProfitLossSummaryDtoCopyWith < $Res > {
factory _ $ $ProfitLossSummaryDtoImplCopyWith (
_ $ProfitLossSummaryDtoImpl value ,
$Res Function ( _ $ProfitLossSummaryDtoImpl ) then ,
) = __ $ $ProfitLossSummaryDtoImplCopyWithImpl < $Res > ;
@ override
@ useResult
$Res call ( {
@ JsonKey ( name: ' total_revenue ' ) int ? totalRevenue ,
@ JsonKey ( name: ' total_cost ' ) int ? totalCost ,
@ JsonKey ( name: ' gross_profit ' ) int ? grossProfit ,
@ JsonKey ( name: ' gross_profit_margin ' ) double ? grossProfitMargin ,
@ JsonKey ( name: ' total_tax ' ) int ? totalTax ,
@ JsonKey ( name: ' total_discount ' ) int ? totalDiscount ,
@ JsonKey ( name: ' net_profit ' ) int ? 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 __ $ $ProfitLossSummaryDtoImplCopyWithImpl < $Res >
extends _ $ProfitLossSummaryDtoCopyWithImpl < $Res , _ $ProfitLossSummaryDtoImpl >
implements _ $ $ProfitLossSummaryDtoImplCopyWith < $Res > {
__ $ $ProfitLossSummaryDtoImplCopyWithImpl (
_ $ProfitLossSummaryDtoImpl _value ,
$Res Function ( _ $ProfitLossSummaryDtoImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of ProfitLossSummaryDto
/// 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 (
_ $ProfitLossSummaryDtoImpl (
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 int ? ,
grossProfit: freezed = = grossProfit
? _value . grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as int ? ,
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 int ? ,
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 _ $ProfitLossSummaryDtoImpl extends _ProfitLossSummaryDto {
const _ $ProfitLossSummaryDtoImpl ( {
@ 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 _ $ProfitLossSummaryDtoImpl . fromJson ( Map < String , dynamic > json ) = >
_ $ $ProfitLossSummaryDtoImplFromJson ( json ) ;
@ override
@ JsonKey ( name: ' total_revenue ' )
final int ? totalRevenue ;
@ override
@ JsonKey ( name: ' total_cost ' )
final int ? totalCost ;
@ override
@ JsonKey ( name: ' gross_profit ' )
final int ? 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 int ? 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 ' ProfitLossSummaryDto(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 _ $ProfitLossSummaryDtoImpl & &
( 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 ProfitLossSummaryDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $ProfitLossSummaryDtoImplCopyWith < _ $ProfitLossSummaryDtoImpl >
get copyWith = >
__ $ $ProfitLossSummaryDtoImplCopyWithImpl < _ $ProfitLossSummaryDtoImpl > (
this ,
_ $identity ,
) ;
@ override
Map < String , dynamic > toJson ( ) {
return _ $ $ProfitLossSummaryDtoImplToJson ( this ) ;
}
}
abstract class _ProfitLossSummaryDto extends ProfitLossSummaryDto {
const factory _ProfitLossSummaryDto ( {
@ JsonKey ( name: ' total_revenue ' ) final int ? totalRevenue ,
@ JsonKey ( name: ' total_cost ' ) final int ? totalCost ,
@ JsonKey ( name: ' gross_profit ' ) final int ? 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 int ? 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 ,
} ) = _ $ProfitLossSummaryDtoImpl ;
const _ProfitLossSummaryDto . _ ( ) : super . _ ( ) ;
factory _ProfitLossSummaryDto . fromJson ( Map < String , dynamic > json ) =
_ $ProfitLossSummaryDtoImpl . fromJson ;
@ override
@ JsonKey ( name: ' total_revenue ' )
int ? get totalRevenue ;
@ override
@ JsonKey ( name: ' total_cost ' )
int ? get totalCost ;
@ override
@ JsonKey ( name: ' gross_profit ' )
int ? 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 ' )
int ? 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 ProfitLossSummaryDto
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $ProfitLossSummaryDtoImplCopyWith < _ $ProfitLossSummaryDtoImpl >
get copyWith = > throw _privateConstructorUsedError ;
}
ProfitLossDailyDataDto _ $ProfitLossDailyDataDtoFromJson (
Map < String , dynamic > json ,
) {
return _ProfitLossDailyDataDto . fromJson ( json ) ;
}
/// @nodoc
mixin _ $ProfitLossDailyDataDto {
@ JsonKey ( name: ' date ' )
String ? get date = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' revenue ' )
int ? get revenue = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' cost ' )
int ? get cost = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' gross_profit ' )
int ? 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 ' )
int ? get netProfit = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' net_profit_margin ' )
double ? get netProfitMargin = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' orders ' )
int ? get orders = > throw _privateConstructorUsedError ;
/// Serializes this ProfitLossDailyDataDto to a JSON map.
Map < String , dynamic > toJson ( ) = > throw _privateConstructorUsedError ;
/// Create a copy of ProfitLossDailyDataDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$ProfitLossDailyDataDtoCopyWith < ProfitLossDailyDataDto > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $ProfitLossDailyDataDtoCopyWith < $Res > {
factory $ProfitLossDailyDataDtoCopyWith (
ProfitLossDailyDataDto value ,
$Res Function ( ProfitLossDailyDataDto ) then ,
) = _ $ProfitLossDailyDataDtoCopyWithImpl < $Res , ProfitLossDailyDataDto > ;
@ useResult
$Res call ( {
@ JsonKey ( name: ' date ' ) String ? date ,
@ JsonKey ( name: ' revenue ' ) int ? revenue ,
@ JsonKey ( name: ' cost ' ) int ? cost ,
@ JsonKey ( name: ' gross_profit ' ) int ? grossProfit ,
@ JsonKey ( name: ' gross_profit_margin ' ) double ? grossProfitMargin ,
@ JsonKey ( name: ' tax ' ) int ? tax ,
@ JsonKey ( name: ' discount ' ) int ? discount ,
@ JsonKey ( name: ' net_profit ' ) int ? netProfit ,
@ JsonKey ( name: ' net_profit_margin ' ) double ? netProfitMargin ,
@ JsonKey ( name: ' orders ' ) int ? orders ,
} ) ;
}
/// @nodoc
class _ $ProfitLossDailyDataDtoCopyWithImpl <
$Res ,
$Val extends ProfitLossDailyDataDto
>
implements $ProfitLossDailyDataDtoCopyWith < $Res > {
_ $ProfitLossDailyDataDtoCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of ProfitLossDailyDataDto
/// 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 int ? ,
grossProfit: freezed = = grossProfit
? _value . grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as int ? ,
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 int ? ,
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 _ $ $ProfitLossDailyDataDtoImplCopyWith < $Res >
implements $ProfitLossDailyDataDtoCopyWith < $Res > {
factory _ $ $ProfitLossDailyDataDtoImplCopyWith (
_ $ProfitLossDailyDataDtoImpl value ,
$Res Function ( _ $ProfitLossDailyDataDtoImpl ) then ,
) = __ $ $ProfitLossDailyDataDtoImplCopyWithImpl < $Res > ;
@ override
@ useResult
$Res call ( {
@ JsonKey ( name: ' date ' ) String ? date ,
@ JsonKey ( name: ' revenue ' ) int ? revenue ,
@ JsonKey ( name: ' cost ' ) int ? cost ,
@ JsonKey ( name: ' gross_profit ' ) int ? grossProfit ,
@ JsonKey ( name: ' gross_profit_margin ' ) double ? grossProfitMargin ,
@ JsonKey ( name: ' tax ' ) int ? tax ,
@ JsonKey ( name: ' discount ' ) int ? discount ,
@ JsonKey ( name: ' net_profit ' ) int ? netProfit ,
@ JsonKey ( name: ' net_profit_margin ' ) double ? netProfitMargin ,
@ JsonKey ( name: ' orders ' ) int ? orders ,
} ) ;
}
/// @nodoc
class __ $ $ProfitLossDailyDataDtoImplCopyWithImpl < $Res >
extends
_ $ProfitLossDailyDataDtoCopyWithImpl < $Res , _ $ProfitLossDailyDataDtoImpl >
implements _ $ $ProfitLossDailyDataDtoImplCopyWith < $Res > {
__ $ $ProfitLossDailyDataDtoImplCopyWithImpl (
_ $ProfitLossDailyDataDtoImpl _value ,
$Res Function ( _ $ProfitLossDailyDataDtoImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of ProfitLossDailyDataDto
/// 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 (
_ $ProfitLossDailyDataDtoImpl (
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 int ? ,
grossProfit: freezed = = grossProfit
? _value . grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as int ? ,
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 int ? ,
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 _ $ProfitLossDailyDataDtoImpl extends _ProfitLossDailyDataDto {
const _ $ProfitLossDailyDataDtoImpl ( {
@ 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 _ $ProfitLossDailyDataDtoImpl . fromJson ( Map < String , dynamic > json ) = >
_ $ $ProfitLossDailyDataDtoImplFromJson ( json ) ;
@ override
@ JsonKey ( name: ' date ' )
final String ? date ;
@ override
@ JsonKey ( name: ' revenue ' )
final int ? revenue ;
@ override
@ JsonKey ( name: ' cost ' )
final int ? cost ;
@ override
@ JsonKey ( name: ' gross_profit ' )
final int ? 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 int ? netProfit ;
@ override
@ JsonKey ( name: ' net_profit_margin ' )
final double ? netProfitMargin ;
@ override
@ JsonKey ( name: ' orders ' )
final int ? orders ;
@ override
String toString ( ) {
return ' ProfitLossDailyDataDto(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 _ $ProfitLossDailyDataDtoImpl & &
( 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 ProfitLossDailyDataDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $ProfitLossDailyDataDtoImplCopyWith < _ $ProfitLossDailyDataDtoImpl >
get copyWith = >
__ $ $ProfitLossDailyDataDtoImplCopyWithImpl < _ $ProfitLossDailyDataDtoImpl > (
this ,
_ $identity ,
) ;
@ override
Map < String , dynamic > toJson ( ) {
return _ $ $ProfitLossDailyDataDtoImplToJson ( this ) ;
}
}
abstract class _ProfitLossDailyDataDto extends ProfitLossDailyDataDto {
const factory _ProfitLossDailyDataDto ( {
@ JsonKey ( name: ' date ' ) final String ? date ,
@ JsonKey ( name: ' revenue ' ) final int ? revenue ,
@ JsonKey ( name: ' cost ' ) final int ? cost ,
@ JsonKey ( name: ' gross_profit ' ) final int ? 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 int ? netProfit ,
@ JsonKey ( name: ' net_profit_margin ' ) final double ? netProfitMargin ,
@ JsonKey ( name: ' orders ' ) final int ? orders ,
} ) = _ $ProfitLossDailyDataDtoImpl ;
const _ProfitLossDailyDataDto . _ ( ) : super . _ ( ) ;
factory _ProfitLossDailyDataDto . fromJson ( Map < String , dynamic > json ) =
_ $ProfitLossDailyDataDtoImpl . fromJson ;
@ override
@ JsonKey ( name: ' date ' )
String ? get date ;
@ override
@ JsonKey ( name: ' revenue ' )
int ? get revenue ;
@ override
@ JsonKey ( name: ' cost ' )
int ? get cost ;
@ override
@ JsonKey ( name: ' gross_profit ' )
int ? 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 ' )
int ? get netProfit ;
@ override
@ JsonKey ( name: ' net_profit_margin ' )
double ? get netProfitMargin ;
@ override
@ JsonKey ( name: ' orders ' )
int ? get orders ;
/// Create a copy of ProfitLossDailyDataDto
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $ProfitLossDailyDataDtoImplCopyWith < _ $ProfitLossDailyDataDtoImpl >
get copyWith = > throw _privateConstructorUsedError ;
}
ProfitLossProductDataDto _ $ProfitLossProductDataDtoFromJson (
Map < String , dynamic > json ,
) {
return _ProfitLossProductDataDto . fromJson ( json ) ;
}
/// @nodoc
mixin _ $ProfitLossProductDataDto {
@ 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 ' )
int ? get cost = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' gross_profit ' )
int ? 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 ' )
int ? get averageCost = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' profit_per_unit ' )
int ? get profitPerUnit = > throw _privateConstructorUsedError ;
/// Serializes this ProfitLossProductDataDto to a JSON map.
Map < String , dynamic > toJson ( ) = > throw _privateConstructorUsedError ;
/// Create a copy of ProfitLossProductDataDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$ProfitLossProductDataDtoCopyWith < ProfitLossProductDataDto > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $ProfitLossProductDataDtoCopyWith < $Res > {
factory $ProfitLossProductDataDtoCopyWith (
ProfitLossProductDataDto value ,
$Res Function ( ProfitLossProductDataDto ) then ,
) = _ $ProfitLossProductDataDtoCopyWithImpl < $Res , ProfitLossProductDataDto > ;
@ 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 ' ) int ? cost ,
@ JsonKey ( name: ' gross_profit ' ) int ? grossProfit ,
@ JsonKey ( name: ' gross_profit_margin ' ) double ? grossProfitMargin ,
@ JsonKey ( name: ' average_price ' ) int ? averagePrice ,
@ JsonKey ( name: ' average_cost ' ) int ? averageCost ,
@ JsonKey ( name: ' profit_per_unit ' ) int ? profitPerUnit ,
} ) ;
}
/// @nodoc
class _ $ProfitLossProductDataDtoCopyWithImpl <
$Res ,
$Val extends ProfitLossProductDataDto
>
implements $ProfitLossProductDataDtoCopyWith < $Res > {
_ $ProfitLossProductDataDtoCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of ProfitLossProductDataDto
/// 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 int ? ,
grossProfit: freezed = = grossProfit
? _value . grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as int ? ,
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 int ? ,
profitPerUnit: freezed = = profitPerUnit
? _value . profitPerUnit
: profitPerUnit // ignore: cast_nullable_to_non_nullable
as int ? ,
)
as $Val ,
) ;
}
}
/// @nodoc
abstract class _ $ $ProfitLossProductDataDtoImplCopyWith < $Res >
implements $ProfitLossProductDataDtoCopyWith < $Res > {
factory _ $ $ProfitLossProductDataDtoImplCopyWith (
_ $ProfitLossProductDataDtoImpl value ,
$Res Function ( _ $ProfitLossProductDataDtoImpl ) then ,
) = __ $ $ProfitLossProductDataDtoImplCopyWithImpl < $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 ' ) int ? cost ,
@ JsonKey ( name: ' gross_profit ' ) int ? grossProfit ,
@ JsonKey ( name: ' gross_profit_margin ' ) double ? grossProfitMargin ,
@ JsonKey ( name: ' average_price ' ) int ? averagePrice ,
@ JsonKey ( name: ' average_cost ' ) int ? averageCost ,
@ JsonKey ( name: ' profit_per_unit ' ) int ? profitPerUnit ,
} ) ;
}
/// @nodoc
class __ $ $ProfitLossProductDataDtoImplCopyWithImpl < $Res >
extends
_ $ProfitLossProductDataDtoCopyWithImpl <
$Res ,
_ $ProfitLossProductDataDtoImpl
>
implements _ $ $ProfitLossProductDataDtoImplCopyWith < $Res > {
__ $ $ProfitLossProductDataDtoImplCopyWithImpl (
_ $ProfitLossProductDataDtoImpl _value ,
$Res Function ( _ $ProfitLossProductDataDtoImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of ProfitLossProductDataDto
/// 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 (
_ $ProfitLossProductDataDtoImpl (
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 int ? ,
grossProfit: freezed = = grossProfit
? _value . grossProfit
: grossProfit // ignore: cast_nullable_to_non_nullable
as int ? ,
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 int ? ,
profitPerUnit: freezed = = profitPerUnit
? _value . profitPerUnit
: profitPerUnit // ignore: cast_nullable_to_non_nullable
as int ? ,
) ,
) ;
}
}
/// @nodoc
@ JsonSerializable ( )
class _ $ProfitLossProductDataDtoImpl extends _ProfitLossProductDataDto {
const _ $ProfitLossProductDataDtoImpl ( {
@ 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 _ $ProfitLossProductDataDtoImpl . fromJson ( Map < String , dynamic > json ) = >
_ $ $ProfitLossProductDataDtoImplFromJson ( 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 int ? cost ;
@ override
@ JsonKey ( name: ' gross_profit ' )
final int ? grossProfit ;
@ override
@ JsonKey ( name: ' gross_profit_margin ' )
final double ? grossProfitMargin ;
@ override
@ JsonKey ( name: ' average_price ' )
final int ? averagePrice ;
@ override
@ JsonKey ( name: ' average_cost ' )
final int ? averageCost ;
@ override
@ JsonKey ( name: ' profit_per_unit ' )
final int ? profitPerUnit ;
@ override
String toString ( ) {
return ' ProfitLossProductDataDto(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 _ $ProfitLossProductDataDtoImpl & &
( 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 ProfitLossProductDataDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $ProfitLossProductDataDtoImplCopyWith < _ $ProfitLossProductDataDtoImpl >
get copyWith = >
__ $ $ProfitLossProductDataDtoImplCopyWithImpl <
_ $ProfitLossProductDataDtoImpl
> ( this , _ $identity ) ;
@ override
Map < String , dynamic > toJson ( ) {
return _ $ $ProfitLossProductDataDtoImplToJson ( this ) ;
}
}
abstract class _ProfitLossProductDataDto extends ProfitLossProductDataDto {
const factory _ProfitLossProductDataDto ( {
@ 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 int ? cost ,
@ JsonKey ( name: ' gross_profit ' ) final int ? grossProfit ,
@ JsonKey ( name: ' gross_profit_margin ' ) final double ? grossProfitMargin ,
@ JsonKey ( name: ' average_price ' ) final int ? averagePrice ,
@ JsonKey ( name: ' average_cost ' ) final int ? averageCost ,
@ JsonKey ( name: ' profit_per_unit ' ) final int ? profitPerUnit ,
} ) = _ $ProfitLossProductDataDtoImpl ;
const _ProfitLossProductDataDto . _ ( ) : super . _ ( ) ;
factory _ProfitLossProductDataDto . fromJson ( Map < String , dynamic > json ) =
_ $ProfitLossProductDataDtoImpl . 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 ' )
int ? get cost ;
@ override
@ JsonKey ( name: ' gross_profit ' )
int ? get grossProfit ;
@ override
@ JsonKey ( name: ' gross_profit_margin ' )
double ? get grossProfitMargin ;
@ override
@ JsonKey ( name: ' average_price ' )
int ? get averagePrice ;
@ override
@ JsonKey ( name: ' average_cost ' )
int ? get averageCost ;
@ override
@ JsonKey ( name: ' profit_per_unit ' )
int ? get profitPerUnit ;
/// Create a copy of ProfitLossProductDataDto
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $ProfitLossProductDataDtoImplCopyWith < _ $ProfitLossProductDataDtoImpl >
get copyWith = > throw _privateConstructorUsedError ;
}
2025-08-17 22:46:25 +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 ' )
String ? get dateFrom = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' date_to ' )
String ? get dateTo = > throw _privateConstructorUsedError ;
@ JsonKey ( name: ' data ' )
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 ' ) String ? dateFrom ,
@ JsonKey ( name: ' date_to ' ) String ? dateTo ,
@ JsonKey ( name: ' data ' ) 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 String ? ,
dateTo: freezed = = dateTo
? _value . dateTo
: dateTo // ignore: cast_nullable_to_non_nullable
as String ? ,
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 ' ) String ? dateFrom ,
@ JsonKey ( name: ' date_to ' ) String ? dateTo ,
@ JsonKey ( name: ' data ' ) 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 String ? ,
dateTo: freezed = = dateTo
? _value . dateTo
: dateTo // ignore: cast_nullable_to_non_nullable
as String ? ,
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 ,
@ JsonKey ( name: ' data ' ) 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 String ? dateFrom ;
@ override
@ JsonKey ( name: ' date_to ' )
final String ? dateTo ;
final List < CategoryAnalyticItemDto > ? _data ;
@ override
@ JsonKey ( name: ' data ' )
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 String ? dateFrom ,
@ JsonKey ( name: ' date_to ' ) final String ? dateTo ,
@ JsonKey ( name: ' data ' ) 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 ' )
String ? get dateFrom ;
@ override
@ JsonKey ( name: ' date_to ' )
String ? get dateTo ;
@ override
@ JsonKey ( name: ' data ' )
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-08-17 23:54:28 +07:00
InventoryAnalyticDto _ $InventoryAnalyticDtoFromJson ( Map < String , dynamic > json ) {
return _InventoryAnalyticDto . fromJson ( json ) ;
}
/// @nodoc
mixin _ $InventoryAnalyticDto {
@ JsonKey ( name: " summary " )
InventorySummaryDto ? get summary = > throw _privateConstructorUsedError ;
@ JsonKey ( name: " products " )
List < InventoryProductDto > ? get products = > throw _privateConstructorUsedError ;
@ JsonKey ( name: " ingredients " )
List < InventoryIngredientDto > ? 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 " ) InventorySummaryDto ? summary ,
@ JsonKey ( name: " products " ) List < InventoryProductDto > ? products ,
@ JsonKey ( name: " ingredients " ) List < InventoryIngredientDto > ? ingredients ,
} ) ;
$InventorySummaryDtoCopyWith < $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 InventorySummaryDto ? ,
products: freezed = = products
? _value . products
: products // ignore: cast_nullable_to_non_nullable
as List < InventoryProductDto > ? ,
ingredients: freezed = = ingredients
? _value . ingredients
: ingredients // ignore: cast_nullable_to_non_nullable
as List < InventoryIngredientDto > ? ,
)
as $Val ,
) ;
}
/// Create a copy of InventoryAnalyticDto
/// with the given fields replaced by the non-null parameter values.
@ override
@ pragma ( ' vm:prefer-inline ' )
$InventorySummaryDtoCopyWith < $Res > ? get summary {
if ( _value . summary = = null ) {
return null ;
}
return $InventorySummaryDtoCopyWith < $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 " ) InventorySummaryDto ? summary ,
@ JsonKey ( name: " products " ) List < InventoryProductDto > ? products ,
@ JsonKey ( name: " ingredients " ) List < InventoryIngredientDto > ? ingredients ,
} ) ;
@ override
$InventorySummaryDtoCopyWith < $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 InventorySummaryDto ? ,
products: freezed = = products
? _value . _products
: products // ignore: cast_nullable_to_non_nullable
as List < InventoryProductDto > ? ,
ingredients: freezed = = ingredients
? _value . _ingredients
: ingredients // ignore: cast_nullable_to_non_nullable
as List < InventoryIngredientDto > ? ,
) ,
) ;
}
}
/// @nodoc
@ JsonSerializable ( )
class _ $InventoryAnalyticDtoImpl extends _InventoryAnalyticDto {
const _ $InventoryAnalyticDtoImpl ( {
@ JsonKey ( name: " summary " ) this . summary ,
@ JsonKey ( name: " products " ) final List < InventoryProductDto > ? products ,
@ JsonKey ( name: " ingredients " )
final List < InventoryIngredientDto > ? ingredients ,
} ) : _products = products ,
_ingredients = ingredients ,
super . _ ( ) ;
factory _ $InventoryAnalyticDtoImpl . fromJson ( Map < String , dynamic > json ) = >
_ $ $InventoryAnalyticDtoImplFromJson ( json ) ;
@ override
@ JsonKey ( name: " summary " )
final InventorySummaryDto ? summary ;
final List < InventoryProductDto > ? _products ;
@ override
@ JsonKey ( name: " products " )
List < InventoryProductDto > ? 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 < InventoryIngredientDto > ? _ingredients ;
@ override
@ JsonKey ( name: " ingredients " )
List < InventoryIngredientDto > ? 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 InventorySummaryDto ? summary ,
@ JsonKey ( name: " products " ) final List < InventoryProductDto > ? products ,
@ JsonKey ( name: " ingredients " )
final List < InventoryIngredientDto > ? ingredients ,
} ) = _ $InventoryAnalyticDtoImpl ;
const _InventoryAnalyticDto . _ ( ) : super . _ ( ) ;
factory _InventoryAnalyticDto . fromJson ( Map < String , dynamic > json ) =
_ $InventoryAnalyticDtoImpl . fromJson ;
@ override
@ JsonKey ( name: " summary " )
InventorySummaryDto ? get summary ;
@ override
@ JsonKey ( name: " products " )
List < InventoryProductDto > ? get products ;
@ override
@ JsonKey ( name: " ingredients " )
List < InventoryIngredientDto > ? 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 ;
}
InventorySummaryDto _ $InventorySummaryDtoFromJson ( Map < String , dynamic > json ) {
return _InventorySummaryDto . fromJson ( json ) ;
}
/// @nodoc
mixin _ $InventorySummaryDto {
@ 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 " )
String ? get generatedAt = > throw _privateConstructorUsedError ;
/// Serializes this InventorySummaryDto to a JSON map.
Map < String , dynamic > toJson ( ) = > throw _privateConstructorUsedError ;
/// Create a copy of InventorySummaryDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$InventorySummaryDtoCopyWith < InventorySummaryDto > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $InventorySummaryDtoCopyWith < $Res > {
factory $InventorySummaryDtoCopyWith (
InventorySummaryDto value ,
$Res Function ( InventorySummaryDto ) then ,
) = _ $InventorySummaryDtoCopyWithImpl < $Res , InventorySummaryDto > ;
@ 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 " ) String ? generatedAt ,
} ) ;
}
/// @nodoc
class _ $InventorySummaryDtoCopyWithImpl < $Res , $Val extends InventorySummaryDto >
implements $InventorySummaryDtoCopyWith < $Res > {
_ $InventorySummaryDtoCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of InventorySummaryDto
/// 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 String ? ,
)
as $Val ,
) ;
}
}
/// @nodoc
abstract class _ $ $InventorySummaryDtoImplCopyWith < $Res >
implements $InventorySummaryDtoCopyWith < $Res > {
factory _ $ $InventorySummaryDtoImplCopyWith (
_ $InventorySummaryDtoImpl value ,
$Res Function ( _ $InventorySummaryDtoImpl ) then ,
) = __ $ $InventorySummaryDtoImplCopyWithImpl < $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 " ) String ? generatedAt ,
} ) ;
}
/// @nodoc
class __ $ $InventorySummaryDtoImplCopyWithImpl < $Res >
extends _ $InventorySummaryDtoCopyWithImpl < $Res , _ $InventorySummaryDtoImpl >
implements _ $ $InventorySummaryDtoImplCopyWith < $Res > {
__ $ $InventorySummaryDtoImplCopyWithImpl (
_ $InventorySummaryDtoImpl _value ,
$Res Function ( _ $InventorySummaryDtoImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of InventorySummaryDto
/// 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 (
_ $InventorySummaryDtoImpl (
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 String ? ,
) ,
) ;
}
}
/// @nodoc
@ JsonSerializable ( )
class _ $InventorySummaryDtoImpl implements _InventorySummaryDto {
const _ $InventorySummaryDtoImpl ( {
@ 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 ,
} ) ;
factory _ $InventorySummaryDtoImpl . fromJson ( Map < String , dynamic > json ) = >
_ $ $InventorySummaryDtoImplFromJson ( 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 String ? generatedAt ;
@ override
String toString ( ) {
return ' InventorySummaryDto(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 _ $InventorySummaryDtoImpl & &
( 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 InventorySummaryDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $InventorySummaryDtoImplCopyWith < _ $InventorySummaryDtoImpl > get copyWith = >
__ $ $InventorySummaryDtoImplCopyWithImpl < _ $InventorySummaryDtoImpl > (
this ,
_ $identity ,
) ;
@ override
Map < String , dynamic > toJson ( ) {
return _ $ $InventorySummaryDtoImplToJson ( this ) ;
}
}
abstract class _InventorySummaryDto implements InventorySummaryDto {
const factory _InventorySummaryDto ( {
@ 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 String ? generatedAt ,
} ) = _ $InventorySummaryDtoImpl ;
factory _InventorySummaryDto . fromJson ( Map < String , dynamic > json ) =
_ $InventorySummaryDtoImpl . 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 " )
String ? get generatedAt ;
/// Create a copy of InventorySummaryDto
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $InventorySummaryDtoImplCopyWith < _ $InventorySummaryDtoImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
InventoryProductDto _ $InventoryProductDtoFromJson ( Map < String , dynamic > json ) {
return _InventoryProductDto . fromJson ( json ) ;
}
/// @nodoc
mixin _ $InventoryProductDto {
@ 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 " )
int ? 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 " )
String ? get updatedAt = > throw _privateConstructorUsedError ;
/// Serializes this InventoryProductDto to a JSON map.
Map < String , dynamic > toJson ( ) = > throw _privateConstructorUsedError ;
/// Create a copy of InventoryProductDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$InventoryProductDtoCopyWith < InventoryProductDto > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $InventoryProductDtoCopyWith < $Res > {
factory $InventoryProductDtoCopyWith (
InventoryProductDto value ,
$Res Function ( InventoryProductDto ) then ,
) = _ $InventoryProductDtoCopyWithImpl < $Res , InventoryProductDto > ;
@ 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 " ) int ? 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 " ) String ? updatedAt ,
} ) ;
}
/// @nodoc
class _ $InventoryProductDtoCopyWithImpl < $Res , $Val extends InventoryProductDto >
implements $InventoryProductDtoCopyWith < $Res > {
_ $InventoryProductDtoCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of InventoryProductDto
/// 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 int ? ,
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 String ? ,
)
as $Val ,
) ;
}
}
/// @nodoc
abstract class _ $ $InventoryProductDtoImplCopyWith < $Res >
implements $InventoryProductDtoCopyWith < $Res > {
factory _ $ $InventoryProductDtoImplCopyWith (
_ $InventoryProductDtoImpl value ,
$Res Function ( _ $InventoryProductDtoImpl ) then ,
) = __ $ $InventoryProductDtoImplCopyWithImpl < $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 " ) int ? 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 " ) String ? updatedAt ,
} ) ;
}
/// @nodoc
class __ $ $InventoryProductDtoImplCopyWithImpl < $Res >
extends _ $InventoryProductDtoCopyWithImpl < $Res , _ $InventoryProductDtoImpl >
implements _ $ $InventoryProductDtoImplCopyWith < $Res > {
__ $ $InventoryProductDtoImplCopyWithImpl (
_ $InventoryProductDtoImpl _value ,
$Res Function ( _ $InventoryProductDtoImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of InventoryProductDto
/// 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 (
_ $InventoryProductDtoImpl (
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 int ? ,
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 String ? ,
) ,
) ;
}
}
/// @nodoc
@ JsonSerializable ( )
class _ $InventoryProductDtoImpl implements _InventoryProductDto {
const _ $InventoryProductDtoImpl ( {
@ 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 ,
} ) ;
factory _ $InventoryProductDtoImpl . fromJson ( Map < String , dynamic > json ) = >
_ $ $InventoryProductDtoImplFromJson ( 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 int ? 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 String ? updatedAt ;
@ override
String toString ( ) {
return ' InventoryProductDto(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 _ $InventoryProductDtoImpl & &
( 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 InventoryProductDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $InventoryProductDtoImplCopyWith < _ $InventoryProductDtoImpl > get copyWith = >
__ $ $InventoryProductDtoImplCopyWithImpl < _ $InventoryProductDtoImpl > (
this ,
_ $identity ,
) ;
@ override
Map < String , dynamic > toJson ( ) {
return _ $ $InventoryProductDtoImplToJson ( this ) ;
}
}
abstract class _InventoryProductDto implements InventoryProductDto {
const factory _InventoryProductDto ( {
@ 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 int ? 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 String ? updatedAt ,
} ) = _ $InventoryProductDtoImpl ;
factory _InventoryProductDto . fromJson ( Map < String , dynamic > json ) =
_ $InventoryProductDtoImpl . 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 " )
int ? 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 " )
String ? get updatedAt ;
/// Create a copy of InventoryProductDto
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $InventoryProductDtoImplCopyWith < _ $InventoryProductDtoImpl > get copyWith = >
throw _privateConstructorUsedError ;
}
InventoryIngredientDto _ $InventoryIngredientDtoFromJson (
Map < String , dynamic > json ,
) {
return _InventoryIngredientDto . fromJson ( json ) ;
}
/// @nodoc
mixin _ $InventoryIngredientDto {
@ 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 " )
int ? 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 " )
String ? get updatedAt = > throw _privateConstructorUsedError ;
/// Serializes this InventoryIngredientDto to a JSON map.
Map < String , dynamic > toJson ( ) = > throw _privateConstructorUsedError ;
/// Create a copy of InventoryIngredientDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
$InventoryIngredientDtoCopyWith < InventoryIngredientDto > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $InventoryIngredientDtoCopyWith < $Res > {
factory $InventoryIngredientDtoCopyWith (
InventoryIngredientDto value ,
$Res Function ( InventoryIngredientDto ) then ,
) = _ $InventoryIngredientDtoCopyWithImpl < $Res , InventoryIngredientDto > ;
@ 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 " ) int ? 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 " ) String ? updatedAt ,
} ) ;
}
/// @nodoc
class _ $InventoryIngredientDtoCopyWithImpl <
$Res ,
$Val extends InventoryIngredientDto
>
implements $InventoryIngredientDtoCopyWith < $Res > {
_ $InventoryIngredientDtoCopyWithImpl ( this . _value , this . _then ) ;
// ignore: unused_field
final $Val _value ;
// ignore: unused_field
final $Res Function ( $Val ) _then ;
/// Create a copy of InventoryIngredientDto
/// 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 int ? ,
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 String ? ,
)
as $Val ,
) ;
}
}
/// @nodoc
abstract class _ $ $InventoryIngredientDtoImplCopyWith < $Res >
implements $InventoryIngredientDtoCopyWith < $Res > {
factory _ $ $InventoryIngredientDtoImplCopyWith (
_ $InventoryIngredientDtoImpl value ,
$Res Function ( _ $InventoryIngredientDtoImpl ) then ,
) = __ $ $InventoryIngredientDtoImplCopyWithImpl < $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 " ) int ? 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 " ) String ? updatedAt ,
} ) ;
}
/// @nodoc
class __ $ $InventoryIngredientDtoImplCopyWithImpl < $Res >
extends
_ $InventoryIngredientDtoCopyWithImpl < $Res , _ $InventoryIngredientDtoImpl >
implements _ $ $InventoryIngredientDtoImplCopyWith < $Res > {
__ $ $InventoryIngredientDtoImplCopyWithImpl (
_ $InventoryIngredientDtoImpl _value ,
$Res Function ( _ $InventoryIngredientDtoImpl ) _then ,
) : super ( _value , _then ) ;
/// Create a copy of InventoryIngredientDto
/// 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 (
_ $InventoryIngredientDtoImpl (
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 int ? ,
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 String ? ,
) ,
) ;
}
}
/// @nodoc
@ JsonSerializable ( )
class _ $InventoryIngredientDtoImpl implements _InventoryIngredientDto {
const _ $InventoryIngredientDtoImpl ( {
@ 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 ,
} ) ;
factory _ $InventoryIngredientDtoImpl . fromJson ( Map < String , dynamic > json ) = >
_ $ $InventoryIngredientDtoImplFromJson ( 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 int ? 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 String ? updatedAt ;
@ override
String toString ( ) {
return ' InventoryIngredientDto(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 _ $InventoryIngredientDtoImpl & &
( 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 InventoryIngredientDto
/// with the given fields replaced by the non-null parameter values.
@ JsonKey ( includeFromJson: false , includeToJson: false )
@ override
@ pragma ( ' vm:prefer-inline ' )
_ $ $InventoryIngredientDtoImplCopyWith < _ $InventoryIngredientDtoImpl >
get copyWith = >
__ $ $InventoryIngredientDtoImplCopyWithImpl < _ $InventoryIngredientDtoImpl > (
this ,
_ $identity ,
) ;
@ override
Map < String , dynamic > toJson ( ) {
return _ $ $InventoryIngredientDtoImplToJson ( this ) ;
}
}
abstract class _InventoryIngredientDto implements InventoryIngredientDto {
const factory _InventoryIngredientDto ( {
@ 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 int ? 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 String ? updatedAt ,
} ) = _ $InventoryIngredientDtoImpl ;
factory _InventoryIngredientDto . fromJson ( Map < String , dynamic > json ) =
_ $InventoryIngredientDtoImpl . 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 " )
int ? 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 " )
String ? get updatedAt ;
/// Create a copy of InventoryIngredientDto
/// with the given fields replaced by the non-null parameter values.
@ override
@ JsonKey ( includeFromJson: false , includeToJson: false )
_ $ $InventoryIngredientDtoImplCopyWith < _ $InventoryIngredientDtoImpl >
get copyWith = > throw _privateConstructorUsedError ;
}