1020 lines
34 KiB
Dart
1020 lines
34 KiB
Dart
// coverage:ignore-file
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// ignore_for_file: type=lint
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
|
|
part of 'analytic_dtos.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
T _$identity<T>(T value) => value;
|
|
|
|
final _privateConstructorUsedError = UnsupportedError(
|
|
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
|
);
|
|
|
|
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;
|
|
}
|