report sales
This commit is contained in:
@@ -1745,3 +1745,997 @@ abstract class _DashboardRecentSaleDto extends DashboardRecentSaleDto {
|
||||
_$$DashboardRecentSaleDtoImplCopyWith<_$DashboardRecentSaleDtoImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
SalesAnalyticDto _$SalesAnalyticDtoFromJson(Map<String, dynamic> json) {
|
||||
return _SalesAnalyticDto.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SalesAnalyticDto {
|
||||
@JsonKey(name: "organization_id")
|
||||
String? get organizationId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "outlet_id")
|
||||
String? get outletId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "date_from")
|
||||
DateTime? get dateFrom => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "date_to")
|
||||
DateTime? get dateTo => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "group_by")
|
||||
String? get groupBy => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "summary")
|
||||
SalesSummaryDto? get summary => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "data")
|
||||
List<SalesAnalyticItemDto>? get data => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this SalesAnalyticDto to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of SalesAnalyticDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$SalesAnalyticDtoCopyWith<SalesAnalyticDto> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $SalesAnalyticDtoCopyWith<$Res> {
|
||||
factory $SalesAnalyticDtoCopyWith(
|
||||
SalesAnalyticDto value,
|
||||
$Res Function(SalesAnalyticDto) then,
|
||||
) = _$SalesAnalyticDtoCopyWithImpl<$Res, SalesAnalyticDto>;
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: "organization_id") String? organizationId,
|
||||
@JsonKey(name: "outlet_id") String? outletId,
|
||||
@JsonKey(name: "date_from") DateTime? dateFrom,
|
||||
@JsonKey(name: "date_to") DateTime? dateTo,
|
||||
@JsonKey(name: "group_by") String? groupBy,
|
||||
@JsonKey(name: "summary") SalesSummaryDto? summary,
|
||||
@JsonKey(name: "data") List<SalesAnalyticItemDto>? data,
|
||||
});
|
||||
|
||||
$SalesSummaryDtoCopyWith<$Res>? get summary;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$SalesAnalyticDtoCopyWithImpl<$Res, $Val extends SalesAnalyticDto>
|
||||
implements $SalesAnalyticDtoCopyWith<$Res> {
|
||||
_$SalesAnalyticDtoCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of SalesAnalyticDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? organizationId = freezed,
|
||||
Object? outletId = freezed,
|
||||
Object? dateFrom = freezed,
|
||||
Object? dateTo = freezed,
|
||||
Object? groupBy = freezed,
|
||||
Object? summary = freezed,
|
||||
Object? data = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
organizationId: freezed == organizationId
|
||||
? _value.organizationId
|
||||
: organizationId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
outletId: freezed == outletId
|
||||
? _value.outletId
|
||||
: outletId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
dateFrom: freezed == dateFrom
|
||||
? _value.dateFrom
|
||||
: dateFrom // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
dateTo: freezed == dateTo
|
||||
? _value.dateTo
|
||||
: dateTo // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
groupBy: freezed == groupBy
|
||||
? _value.groupBy
|
||||
: groupBy // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
summary: freezed == summary
|
||||
? _value.summary
|
||||
: summary // ignore: cast_nullable_to_non_nullable
|
||||
as SalesSummaryDto?,
|
||||
data: freezed == data
|
||||
? _value.data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as List<SalesAnalyticItemDto>?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of SalesAnalyticDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SalesSummaryDtoCopyWith<$Res>? get summary {
|
||||
if (_value.summary == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SalesSummaryDtoCopyWith<$Res>(_value.summary!, (value) {
|
||||
return _then(_value.copyWith(summary: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SalesAnalyticDtoImplCopyWith<$Res>
|
||||
implements $SalesAnalyticDtoCopyWith<$Res> {
|
||||
factory _$$SalesAnalyticDtoImplCopyWith(
|
||||
_$SalesAnalyticDtoImpl value,
|
||||
$Res Function(_$SalesAnalyticDtoImpl) then,
|
||||
) = __$$SalesAnalyticDtoImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: "organization_id") String? organizationId,
|
||||
@JsonKey(name: "outlet_id") String? outletId,
|
||||
@JsonKey(name: "date_from") DateTime? dateFrom,
|
||||
@JsonKey(name: "date_to") DateTime? dateTo,
|
||||
@JsonKey(name: "group_by") String? groupBy,
|
||||
@JsonKey(name: "summary") SalesSummaryDto? summary,
|
||||
@JsonKey(name: "data") List<SalesAnalyticItemDto>? data,
|
||||
});
|
||||
|
||||
@override
|
||||
$SalesSummaryDtoCopyWith<$Res>? get summary;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SalesAnalyticDtoImplCopyWithImpl<$Res>
|
||||
extends _$SalesAnalyticDtoCopyWithImpl<$Res, _$SalesAnalyticDtoImpl>
|
||||
implements _$$SalesAnalyticDtoImplCopyWith<$Res> {
|
||||
__$$SalesAnalyticDtoImplCopyWithImpl(
|
||||
_$SalesAnalyticDtoImpl _value,
|
||||
$Res Function(_$SalesAnalyticDtoImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of SalesAnalyticDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? organizationId = freezed,
|
||||
Object? outletId = freezed,
|
||||
Object? dateFrom = freezed,
|
||||
Object? dateTo = freezed,
|
||||
Object? groupBy = freezed,
|
||||
Object? summary = freezed,
|
||||
Object? data = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_$SalesAnalyticDtoImpl(
|
||||
organizationId: freezed == organizationId
|
||||
? _value.organizationId
|
||||
: organizationId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
outletId: freezed == outletId
|
||||
? _value.outletId
|
||||
: outletId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
dateFrom: freezed == dateFrom
|
||||
? _value.dateFrom
|
||||
: dateFrom // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
dateTo: freezed == dateTo
|
||||
? _value.dateTo
|
||||
: dateTo // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
groupBy: freezed == groupBy
|
||||
? _value.groupBy
|
||||
: groupBy // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
summary: freezed == summary
|
||||
? _value.summary
|
||||
: summary // ignore: cast_nullable_to_non_nullable
|
||||
as SalesSummaryDto?,
|
||||
data: freezed == data
|
||||
? _value._data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as List<SalesAnalyticItemDto>?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$SalesAnalyticDtoImpl extends _SalesAnalyticDto {
|
||||
const _$SalesAnalyticDtoImpl({
|
||||
@JsonKey(name: "organization_id") this.organizationId,
|
||||
@JsonKey(name: "outlet_id") this.outletId,
|
||||
@JsonKey(name: "date_from") this.dateFrom,
|
||||
@JsonKey(name: "date_to") this.dateTo,
|
||||
@JsonKey(name: "group_by") this.groupBy,
|
||||
@JsonKey(name: "summary") this.summary,
|
||||
@JsonKey(name: "data") final List<SalesAnalyticItemDto>? data,
|
||||
}) : _data = data,
|
||||
super._();
|
||||
|
||||
factory _$SalesAnalyticDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$SalesAnalyticDtoImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "organization_id")
|
||||
final String? organizationId;
|
||||
@override
|
||||
@JsonKey(name: "outlet_id")
|
||||
final String? outletId;
|
||||
@override
|
||||
@JsonKey(name: "date_from")
|
||||
final DateTime? dateFrom;
|
||||
@override
|
||||
@JsonKey(name: "date_to")
|
||||
final DateTime? dateTo;
|
||||
@override
|
||||
@JsonKey(name: "group_by")
|
||||
final String? groupBy;
|
||||
@override
|
||||
@JsonKey(name: "summary")
|
||||
final SalesSummaryDto? summary;
|
||||
final List<SalesAnalyticItemDto>? _data;
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<SalesAnalyticItemDto>? get data {
|
||||
final value = _data;
|
||||
if (value == null) return null;
|
||||
if (_data is EqualUnmodifiableListView) return _data;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SalesAnalyticDto(organizationId: $organizationId, outletId: $outletId, dateFrom: $dateFrom, dateTo: $dateTo, groupBy: $groupBy, summary: $summary, data: $data)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$SalesAnalyticDtoImpl &&
|
||||
(identical(other.organizationId, organizationId) ||
|
||||
other.organizationId == organizationId) &&
|
||||
(identical(other.outletId, outletId) ||
|
||||
other.outletId == outletId) &&
|
||||
(identical(other.dateFrom, dateFrom) ||
|
||||
other.dateFrom == dateFrom) &&
|
||||
(identical(other.dateTo, dateTo) || other.dateTo == dateTo) &&
|
||||
(identical(other.groupBy, groupBy) || other.groupBy == groupBy) &&
|
||||
(identical(other.summary, summary) || other.summary == summary) &&
|
||||
const DeepCollectionEquality().equals(other._data, _data));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
organizationId,
|
||||
outletId,
|
||||
dateFrom,
|
||||
dateTo,
|
||||
groupBy,
|
||||
summary,
|
||||
const DeepCollectionEquality().hash(_data),
|
||||
);
|
||||
|
||||
/// Create a copy of SalesAnalyticDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SalesAnalyticDtoImplCopyWith<_$SalesAnalyticDtoImpl> get copyWith =>
|
||||
__$$SalesAnalyticDtoImplCopyWithImpl<_$SalesAnalyticDtoImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$SalesAnalyticDtoImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _SalesAnalyticDto extends SalesAnalyticDto {
|
||||
const factory _SalesAnalyticDto({
|
||||
@JsonKey(name: "organization_id") final String? organizationId,
|
||||
@JsonKey(name: "outlet_id") final String? outletId,
|
||||
@JsonKey(name: "date_from") final DateTime? dateFrom,
|
||||
@JsonKey(name: "date_to") final DateTime? dateTo,
|
||||
@JsonKey(name: "group_by") final String? groupBy,
|
||||
@JsonKey(name: "summary") final SalesSummaryDto? summary,
|
||||
@JsonKey(name: "data") final List<SalesAnalyticItemDto>? data,
|
||||
}) = _$SalesAnalyticDtoImpl;
|
||||
const _SalesAnalyticDto._() : super._();
|
||||
|
||||
factory _SalesAnalyticDto.fromJson(Map<String, dynamic> json) =
|
||||
_$SalesAnalyticDtoImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "organization_id")
|
||||
String? get organizationId;
|
||||
@override
|
||||
@JsonKey(name: "outlet_id")
|
||||
String? get outletId;
|
||||
@override
|
||||
@JsonKey(name: "date_from")
|
||||
DateTime? get dateFrom;
|
||||
@override
|
||||
@JsonKey(name: "date_to")
|
||||
DateTime? get dateTo;
|
||||
@override
|
||||
@JsonKey(name: "group_by")
|
||||
String? get groupBy;
|
||||
@override
|
||||
@JsonKey(name: "summary")
|
||||
SalesSummaryDto? get summary;
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<SalesAnalyticItemDto>? get data;
|
||||
|
||||
/// Create a copy of SalesAnalyticDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$SalesAnalyticDtoImplCopyWith<_$SalesAnalyticDtoImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
SalesSummaryDto _$SalesSummaryDtoFromJson(Map<String, dynamic> json) {
|
||||
return _SalesSummaryDto.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SalesSummaryDto {
|
||||
@JsonKey(name: "total_sales")
|
||||
int? get totalSales => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "total_orders")
|
||||
int? get totalOrders => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "total_items")
|
||||
int? get totalItems => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "average_order_value")
|
||||
double? get averageOrderValue => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "total_tax")
|
||||
int? get totalTax => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "total_discount")
|
||||
int? get totalDiscount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "net_sales")
|
||||
int? get netSales => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this SalesSummaryDto to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of SalesSummaryDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$SalesSummaryDtoCopyWith<SalesSummaryDto> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $SalesSummaryDtoCopyWith<$Res> {
|
||||
factory $SalesSummaryDtoCopyWith(
|
||||
SalesSummaryDto value,
|
||||
$Res Function(SalesSummaryDto) then,
|
||||
) = _$SalesSummaryDtoCopyWithImpl<$Res, SalesSummaryDto>;
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: "total_sales") int? totalSales,
|
||||
@JsonKey(name: "total_orders") int? totalOrders,
|
||||
@JsonKey(name: "total_items") int? totalItems,
|
||||
@JsonKey(name: "average_order_value") double? averageOrderValue,
|
||||
@JsonKey(name: "total_tax") int? totalTax,
|
||||
@JsonKey(name: "total_discount") int? totalDiscount,
|
||||
@JsonKey(name: "net_sales") int? netSales,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$SalesSummaryDtoCopyWithImpl<$Res, $Val extends SalesSummaryDto>
|
||||
implements $SalesSummaryDtoCopyWith<$Res> {
|
||||
_$SalesSummaryDtoCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of SalesSummaryDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? totalSales = freezed,
|
||||
Object? totalOrders = freezed,
|
||||
Object? totalItems = freezed,
|
||||
Object? averageOrderValue = freezed,
|
||||
Object? totalTax = freezed,
|
||||
Object? totalDiscount = freezed,
|
||||
Object? netSales = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
totalSales: freezed == totalSales
|
||||
? _value.totalSales
|
||||
: totalSales // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalOrders: freezed == totalOrders
|
||||
? _value.totalOrders
|
||||
: totalOrders // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalItems: freezed == totalItems
|
||||
? _value.totalItems
|
||||
: totalItems // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
averageOrderValue: freezed == averageOrderValue
|
||||
? _value.averageOrderValue
|
||||
: averageOrderValue // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
totalTax: freezed == totalTax
|
||||
? _value.totalTax
|
||||
: totalTax // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalDiscount: freezed == totalDiscount
|
||||
? _value.totalDiscount
|
||||
: totalDiscount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
netSales: freezed == netSales
|
||||
? _value.netSales
|
||||
: netSales // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SalesSummaryDtoImplCopyWith<$Res>
|
||||
implements $SalesSummaryDtoCopyWith<$Res> {
|
||||
factory _$$SalesSummaryDtoImplCopyWith(
|
||||
_$SalesSummaryDtoImpl value,
|
||||
$Res Function(_$SalesSummaryDtoImpl) then,
|
||||
) = __$$SalesSummaryDtoImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: "total_sales") int? totalSales,
|
||||
@JsonKey(name: "total_orders") int? totalOrders,
|
||||
@JsonKey(name: "total_items") int? totalItems,
|
||||
@JsonKey(name: "average_order_value") double? averageOrderValue,
|
||||
@JsonKey(name: "total_tax") int? totalTax,
|
||||
@JsonKey(name: "total_discount") int? totalDiscount,
|
||||
@JsonKey(name: "net_sales") int? netSales,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SalesSummaryDtoImplCopyWithImpl<$Res>
|
||||
extends _$SalesSummaryDtoCopyWithImpl<$Res, _$SalesSummaryDtoImpl>
|
||||
implements _$$SalesSummaryDtoImplCopyWith<$Res> {
|
||||
__$$SalesSummaryDtoImplCopyWithImpl(
|
||||
_$SalesSummaryDtoImpl _value,
|
||||
$Res Function(_$SalesSummaryDtoImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of SalesSummaryDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? totalSales = freezed,
|
||||
Object? totalOrders = freezed,
|
||||
Object? totalItems = freezed,
|
||||
Object? averageOrderValue = freezed,
|
||||
Object? totalTax = freezed,
|
||||
Object? totalDiscount = freezed,
|
||||
Object? netSales = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_$SalesSummaryDtoImpl(
|
||||
totalSales: freezed == totalSales
|
||||
? _value.totalSales
|
||||
: totalSales // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalOrders: freezed == totalOrders
|
||||
? _value.totalOrders
|
||||
: totalOrders // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalItems: freezed == totalItems
|
||||
? _value.totalItems
|
||||
: totalItems // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
averageOrderValue: freezed == averageOrderValue
|
||||
? _value.averageOrderValue
|
||||
: averageOrderValue // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
totalTax: freezed == totalTax
|
||||
? _value.totalTax
|
||||
: totalTax // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalDiscount: freezed == totalDiscount
|
||||
? _value.totalDiscount
|
||||
: totalDiscount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
netSales: freezed == netSales
|
||||
? _value.netSales
|
||||
: netSales // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$SalesSummaryDtoImpl extends _SalesSummaryDto {
|
||||
const _$SalesSummaryDtoImpl({
|
||||
@JsonKey(name: "total_sales") this.totalSales,
|
||||
@JsonKey(name: "total_orders") this.totalOrders,
|
||||
@JsonKey(name: "total_items") this.totalItems,
|
||||
@JsonKey(name: "average_order_value") this.averageOrderValue,
|
||||
@JsonKey(name: "total_tax") this.totalTax,
|
||||
@JsonKey(name: "total_discount") this.totalDiscount,
|
||||
@JsonKey(name: "net_sales") this.netSales,
|
||||
}) : super._();
|
||||
|
||||
factory _$SalesSummaryDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$SalesSummaryDtoImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_sales")
|
||||
final int? totalSales;
|
||||
@override
|
||||
@JsonKey(name: "total_orders")
|
||||
final int? totalOrders;
|
||||
@override
|
||||
@JsonKey(name: "total_items")
|
||||
final int? totalItems;
|
||||
@override
|
||||
@JsonKey(name: "average_order_value")
|
||||
final double? averageOrderValue;
|
||||
@override
|
||||
@JsonKey(name: "total_tax")
|
||||
final int? totalTax;
|
||||
@override
|
||||
@JsonKey(name: "total_discount")
|
||||
final int? totalDiscount;
|
||||
@override
|
||||
@JsonKey(name: "net_sales")
|
||||
final int? netSales;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SalesSummaryDto(totalSales: $totalSales, totalOrders: $totalOrders, totalItems: $totalItems, averageOrderValue: $averageOrderValue, totalTax: $totalTax, totalDiscount: $totalDiscount, netSales: $netSales)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$SalesSummaryDtoImpl &&
|
||||
(identical(other.totalSales, totalSales) ||
|
||||
other.totalSales == totalSales) &&
|
||||
(identical(other.totalOrders, totalOrders) ||
|
||||
other.totalOrders == totalOrders) &&
|
||||
(identical(other.totalItems, totalItems) ||
|
||||
other.totalItems == totalItems) &&
|
||||
(identical(other.averageOrderValue, averageOrderValue) ||
|
||||
other.averageOrderValue == averageOrderValue) &&
|
||||
(identical(other.totalTax, totalTax) ||
|
||||
other.totalTax == totalTax) &&
|
||||
(identical(other.totalDiscount, totalDiscount) ||
|
||||
other.totalDiscount == totalDiscount) &&
|
||||
(identical(other.netSales, netSales) ||
|
||||
other.netSales == netSales));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
totalSales,
|
||||
totalOrders,
|
||||
totalItems,
|
||||
averageOrderValue,
|
||||
totalTax,
|
||||
totalDiscount,
|
||||
netSales,
|
||||
);
|
||||
|
||||
/// Create a copy of SalesSummaryDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SalesSummaryDtoImplCopyWith<_$SalesSummaryDtoImpl> get copyWith =>
|
||||
__$$SalesSummaryDtoImplCopyWithImpl<_$SalesSummaryDtoImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$SalesSummaryDtoImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _SalesSummaryDto extends SalesSummaryDto {
|
||||
const factory _SalesSummaryDto({
|
||||
@JsonKey(name: "total_sales") final int? totalSales,
|
||||
@JsonKey(name: "total_orders") final int? totalOrders,
|
||||
@JsonKey(name: "total_items") final int? totalItems,
|
||||
@JsonKey(name: "average_order_value") final double? averageOrderValue,
|
||||
@JsonKey(name: "total_tax") final int? totalTax,
|
||||
@JsonKey(name: "total_discount") final int? totalDiscount,
|
||||
@JsonKey(name: "net_sales") final int? netSales,
|
||||
}) = _$SalesSummaryDtoImpl;
|
||||
const _SalesSummaryDto._() : super._();
|
||||
|
||||
factory _SalesSummaryDto.fromJson(Map<String, dynamic> json) =
|
||||
_$SalesSummaryDtoImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_sales")
|
||||
int? get totalSales;
|
||||
@override
|
||||
@JsonKey(name: "total_orders")
|
||||
int? get totalOrders;
|
||||
@override
|
||||
@JsonKey(name: "total_items")
|
||||
int? get totalItems;
|
||||
@override
|
||||
@JsonKey(name: "average_order_value")
|
||||
double? get averageOrderValue;
|
||||
@override
|
||||
@JsonKey(name: "total_tax")
|
||||
int? get totalTax;
|
||||
@override
|
||||
@JsonKey(name: "total_discount")
|
||||
int? get totalDiscount;
|
||||
@override
|
||||
@JsonKey(name: "net_sales")
|
||||
int? get netSales;
|
||||
|
||||
/// Create a copy of SalesSummaryDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$SalesSummaryDtoImplCopyWith<_$SalesSummaryDtoImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
SalesAnalyticItemDto _$SalesAnalyticItemDtoFromJson(Map<String, dynamic> json) {
|
||||
return _SalesAnalyticItemDto.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SalesAnalyticItemDto {
|
||||
@JsonKey(name: "date")
|
||||
DateTime? get date => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "sales")
|
||||
int? get sales => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "orders")
|
||||
int? get orders => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "items")
|
||||
int? get items => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "tax")
|
||||
int? get tax => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "discount")
|
||||
int? get discount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "net_sales")
|
||||
int? get netSales => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this SalesAnalyticItemDto to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of SalesAnalyticItemDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$SalesAnalyticItemDtoCopyWith<SalesAnalyticItemDto> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $SalesAnalyticItemDtoCopyWith<$Res> {
|
||||
factory $SalesAnalyticItemDtoCopyWith(
|
||||
SalesAnalyticItemDto value,
|
||||
$Res Function(SalesAnalyticItemDto) then,
|
||||
) = _$SalesAnalyticItemDtoCopyWithImpl<$Res, SalesAnalyticItemDto>;
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: "date") DateTime? date,
|
||||
@JsonKey(name: "sales") int? sales,
|
||||
@JsonKey(name: "orders") int? orders,
|
||||
@JsonKey(name: "items") int? items,
|
||||
@JsonKey(name: "tax") int? tax,
|
||||
@JsonKey(name: "discount") int? discount,
|
||||
@JsonKey(name: "net_sales") int? netSales,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$SalesAnalyticItemDtoCopyWithImpl<
|
||||
$Res,
|
||||
$Val extends SalesAnalyticItemDto
|
||||
>
|
||||
implements $SalesAnalyticItemDtoCopyWith<$Res> {
|
||||
_$SalesAnalyticItemDtoCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of SalesAnalyticItemDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? date = freezed,
|
||||
Object? sales = freezed,
|
||||
Object? orders = freezed,
|
||||
Object? items = freezed,
|
||||
Object? tax = freezed,
|
||||
Object? discount = freezed,
|
||||
Object? netSales = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
date: freezed == date
|
||||
? _value.date
|
||||
: date // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
sales: freezed == sales
|
||||
? _value.sales
|
||||
: sales // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
orders: freezed == orders
|
||||
? _value.orders
|
||||
: orders // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
items: freezed == items
|
||||
? _value.items
|
||||
: items // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
tax: freezed == tax
|
||||
? _value.tax
|
||||
: tax // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
discount: freezed == discount
|
||||
? _value.discount
|
||||
: discount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
netSales: freezed == netSales
|
||||
? _value.netSales
|
||||
: netSales // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SalesAnalyticItemDtoImplCopyWith<$Res>
|
||||
implements $SalesAnalyticItemDtoCopyWith<$Res> {
|
||||
factory _$$SalesAnalyticItemDtoImplCopyWith(
|
||||
_$SalesAnalyticItemDtoImpl value,
|
||||
$Res Function(_$SalesAnalyticItemDtoImpl) then,
|
||||
) = __$$SalesAnalyticItemDtoImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: "date") DateTime? date,
|
||||
@JsonKey(name: "sales") int? sales,
|
||||
@JsonKey(name: "orders") int? orders,
|
||||
@JsonKey(name: "items") int? items,
|
||||
@JsonKey(name: "tax") int? tax,
|
||||
@JsonKey(name: "discount") int? discount,
|
||||
@JsonKey(name: "net_sales") int? netSales,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SalesAnalyticItemDtoImplCopyWithImpl<$Res>
|
||||
extends _$SalesAnalyticItemDtoCopyWithImpl<$Res, _$SalesAnalyticItemDtoImpl>
|
||||
implements _$$SalesAnalyticItemDtoImplCopyWith<$Res> {
|
||||
__$$SalesAnalyticItemDtoImplCopyWithImpl(
|
||||
_$SalesAnalyticItemDtoImpl _value,
|
||||
$Res Function(_$SalesAnalyticItemDtoImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of SalesAnalyticItemDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? date = freezed,
|
||||
Object? sales = freezed,
|
||||
Object? orders = freezed,
|
||||
Object? items = freezed,
|
||||
Object? tax = freezed,
|
||||
Object? discount = freezed,
|
||||
Object? netSales = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_$SalesAnalyticItemDtoImpl(
|
||||
date: freezed == date
|
||||
? _value.date
|
||||
: date // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
sales: freezed == sales
|
||||
? _value.sales
|
||||
: sales // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
orders: freezed == orders
|
||||
? _value.orders
|
||||
: orders // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
items: freezed == items
|
||||
? _value.items
|
||||
: items // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
tax: freezed == tax
|
||||
? _value.tax
|
||||
: tax // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
discount: freezed == discount
|
||||
? _value.discount
|
||||
: discount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
netSales: freezed == netSales
|
||||
? _value.netSales
|
||||
: netSales // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$SalesAnalyticItemDtoImpl extends _SalesAnalyticItemDto {
|
||||
const _$SalesAnalyticItemDtoImpl({
|
||||
@JsonKey(name: "date") this.date,
|
||||
@JsonKey(name: "sales") this.sales,
|
||||
@JsonKey(name: "orders") this.orders,
|
||||
@JsonKey(name: "items") this.items,
|
||||
@JsonKey(name: "tax") this.tax,
|
||||
@JsonKey(name: "discount") this.discount,
|
||||
@JsonKey(name: "net_sales") this.netSales,
|
||||
}) : super._();
|
||||
|
||||
factory _$SalesAnalyticItemDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$SalesAnalyticItemDtoImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "date")
|
||||
final DateTime? date;
|
||||
@override
|
||||
@JsonKey(name: "sales")
|
||||
final int? sales;
|
||||
@override
|
||||
@JsonKey(name: "orders")
|
||||
final int? orders;
|
||||
@override
|
||||
@JsonKey(name: "items")
|
||||
final int? items;
|
||||
@override
|
||||
@JsonKey(name: "tax")
|
||||
final int? tax;
|
||||
@override
|
||||
@JsonKey(name: "discount")
|
||||
final int? discount;
|
||||
@override
|
||||
@JsonKey(name: "net_sales")
|
||||
final int? netSales;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SalesAnalyticItemDto(date: $date, sales: $sales, orders: $orders, items: $items, tax: $tax, discount: $discount, netSales: $netSales)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$SalesAnalyticItemDtoImpl &&
|
||||
(identical(other.date, date) || other.date == date) &&
|
||||
(identical(other.sales, sales) || other.sales == sales) &&
|
||||
(identical(other.orders, orders) || other.orders == orders) &&
|
||||
(identical(other.items, items) || other.items == items) &&
|
||||
(identical(other.tax, tax) || other.tax == tax) &&
|
||||
(identical(other.discount, discount) ||
|
||||
other.discount == discount) &&
|
||||
(identical(other.netSales, netSales) ||
|
||||
other.netSales == netSales));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
date,
|
||||
sales,
|
||||
orders,
|
||||
items,
|
||||
tax,
|
||||
discount,
|
||||
netSales,
|
||||
);
|
||||
|
||||
/// Create a copy of SalesAnalyticItemDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SalesAnalyticItemDtoImplCopyWith<_$SalesAnalyticItemDtoImpl>
|
||||
get copyWith =>
|
||||
__$$SalesAnalyticItemDtoImplCopyWithImpl<_$SalesAnalyticItemDtoImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$SalesAnalyticItemDtoImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _SalesAnalyticItemDto extends SalesAnalyticItemDto {
|
||||
const factory _SalesAnalyticItemDto({
|
||||
@JsonKey(name: "date") final DateTime? date,
|
||||
@JsonKey(name: "sales") final int? sales,
|
||||
@JsonKey(name: "orders") final int? orders,
|
||||
@JsonKey(name: "items") final int? items,
|
||||
@JsonKey(name: "tax") final int? tax,
|
||||
@JsonKey(name: "discount") final int? discount,
|
||||
@JsonKey(name: "net_sales") final int? netSales,
|
||||
}) = _$SalesAnalyticItemDtoImpl;
|
||||
const _SalesAnalyticItemDto._() : super._();
|
||||
|
||||
factory _SalesAnalyticItemDto.fromJson(Map<String, dynamic> json) =
|
||||
_$SalesAnalyticItemDtoImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "date")
|
||||
DateTime? get date;
|
||||
@override
|
||||
@JsonKey(name: "sales")
|
||||
int? get sales;
|
||||
@override
|
||||
@JsonKey(name: "orders")
|
||||
int? get orders;
|
||||
@override
|
||||
@JsonKey(name: "items")
|
||||
int? get items;
|
||||
@override
|
||||
@JsonKey(name: "tax")
|
||||
int? get tax;
|
||||
@override
|
||||
@JsonKey(name: "discount")
|
||||
int? get discount;
|
||||
@override
|
||||
@JsonKey(name: "net_sales")
|
||||
int? get netSales;
|
||||
|
||||
/// Create a copy of SalesAnalyticItemDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$SalesAnalyticItemDtoImplCopyWith<_$SalesAnalyticItemDtoImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user