feat: product analytic repo
This commit is contained in:
@@ -5723,6 +5723,552 @@ abstract class _DashboardRecentSale implements DashboardRecentSale {
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ProductAnalytic {
|
||||
String get organizationId => throw _privateConstructorUsedError;
|
||||
String get outletId => throw _privateConstructorUsedError;
|
||||
String get dateFrom => throw _privateConstructorUsedError;
|
||||
String get dateTo => throw _privateConstructorUsedError;
|
||||
List<ProductAnalyticData> get data => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of ProductAnalytic
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ProductAnalyticCopyWith<ProductAnalytic> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ProductAnalyticCopyWith<$Res> {
|
||||
factory $ProductAnalyticCopyWith(
|
||||
ProductAnalytic value,
|
||||
$Res Function(ProductAnalytic) then,
|
||||
) = _$ProductAnalyticCopyWithImpl<$Res, ProductAnalytic>;
|
||||
@useResult
|
||||
$Res call({
|
||||
String organizationId,
|
||||
String outletId,
|
||||
String dateFrom,
|
||||
String dateTo,
|
||||
List<ProductAnalyticData> data,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ProductAnalyticCopyWithImpl<$Res, $Val extends ProductAnalytic>
|
||||
implements $ProductAnalyticCopyWith<$Res> {
|
||||
_$ProductAnalyticCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ProductAnalytic
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? organizationId = null,
|
||||
Object? outletId = null,
|
||||
Object? dateFrom = null,
|
||||
Object? dateTo = null,
|
||||
Object? data = null,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
organizationId: null == organizationId
|
||||
? _value.organizationId
|
||||
: organizationId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
outletId: null == outletId
|
||||
? _value.outletId
|
||||
: outletId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
dateFrom: null == dateFrom
|
||||
? _value.dateFrom
|
||||
: dateFrom // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
dateTo: null == dateTo
|
||||
? _value.dateTo
|
||||
: dateTo // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
data: null == data
|
||||
? _value.data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as List<ProductAnalyticData>,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProductAnalyticImplCopyWith<$Res>
|
||||
implements $ProductAnalyticCopyWith<$Res> {
|
||||
factory _$$ProductAnalyticImplCopyWith(
|
||||
_$ProductAnalyticImpl value,
|
||||
$Res Function(_$ProductAnalyticImpl) then,
|
||||
) = __$$ProductAnalyticImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
String organizationId,
|
||||
String outletId,
|
||||
String dateFrom,
|
||||
String dateTo,
|
||||
List<ProductAnalyticData> data,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProductAnalyticImplCopyWithImpl<$Res>
|
||||
extends _$ProductAnalyticCopyWithImpl<$Res, _$ProductAnalyticImpl>
|
||||
implements _$$ProductAnalyticImplCopyWith<$Res> {
|
||||
__$$ProductAnalyticImplCopyWithImpl(
|
||||
_$ProductAnalyticImpl _value,
|
||||
$Res Function(_$ProductAnalyticImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of ProductAnalytic
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? organizationId = null,
|
||||
Object? outletId = null,
|
||||
Object? dateFrom = null,
|
||||
Object? dateTo = null,
|
||||
Object? data = null,
|
||||
}) {
|
||||
return _then(
|
||||
_$ProductAnalyticImpl(
|
||||
organizationId: null == organizationId
|
||||
? _value.organizationId
|
||||
: organizationId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
outletId: null == outletId
|
||||
? _value.outletId
|
||||
: outletId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
dateFrom: null == dateFrom
|
||||
? _value.dateFrom
|
||||
: dateFrom // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
dateTo: null == dateTo
|
||||
? _value.dateTo
|
||||
: dateTo // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
data: null == data
|
||||
? _value._data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as List<ProductAnalyticData>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$ProductAnalyticImpl implements _ProductAnalytic {
|
||||
const _$ProductAnalyticImpl({
|
||||
required this.organizationId,
|
||||
required this.outletId,
|
||||
required this.dateFrom,
|
||||
required this.dateTo,
|
||||
required final List<ProductAnalyticData> data,
|
||||
}) : _data = data;
|
||||
|
||||
@override
|
||||
final String organizationId;
|
||||
@override
|
||||
final String outletId;
|
||||
@override
|
||||
final String dateFrom;
|
||||
@override
|
||||
final String dateTo;
|
||||
final List<ProductAnalyticData> _data;
|
||||
@override
|
||||
List<ProductAnalyticData> get data {
|
||||
if (_data is EqualUnmodifiableListView) return _data;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_data);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ProductAnalytic(organizationId: $organizationId, outletId: $outletId, dateFrom: $dateFrom, dateTo: $dateTo, data: $data)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ProductAnalyticImpl &&
|
||||
(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));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
organizationId,
|
||||
outletId,
|
||||
dateFrom,
|
||||
dateTo,
|
||||
const DeepCollectionEquality().hash(_data),
|
||||
);
|
||||
|
||||
/// Create a copy of ProductAnalytic
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProductAnalyticImplCopyWith<_$ProductAnalyticImpl> get copyWith =>
|
||||
__$$ProductAnalyticImplCopyWithImpl<_$ProductAnalyticImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
}
|
||||
|
||||
abstract class _ProductAnalytic implements ProductAnalytic {
|
||||
const factory _ProductAnalytic({
|
||||
required final String organizationId,
|
||||
required final String outletId,
|
||||
required final String dateFrom,
|
||||
required final String dateTo,
|
||||
required final List<ProductAnalyticData> data,
|
||||
}) = _$ProductAnalyticImpl;
|
||||
|
||||
@override
|
||||
String get organizationId;
|
||||
@override
|
||||
String get outletId;
|
||||
@override
|
||||
String get dateFrom;
|
||||
@override
|
||||
String get dateTo;
|
||||
@override
|
||||
List<ProductAnalyticData> get data;
|
||||
|
||||
/// Create a copy of ProductAnalytic
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProductAnalyticImplCopyWith<_$ProductAnalyticImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ProductAnalyticData {
|
||||
String get productId => throw _privateConstructorUsedError;
|
||||
String get productName => throw _privateConstructorUsedError;
|
||||
String get categoryId => throw _privateConstructorUsedError;
|
||||
String get categoryName => throw _privateConstructorUsedError;
|
||||
int get quantitySold => throw _privateConstructorUsedError;
|
||||
double get revenue => throw _privateConstructorUsedError;
|
||||
double get averagePrice => throw _privateConstructorUsedError;
|
||||
int get orderCount => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of ProductAnalyticData
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ProductAnalyticDataCopyWith<ProductAnalyticData> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ProductAnalyticDataCopyWith<$Res> {
|
||||
factory $ProductAnalyticDataCopyWith(
|
||||
ProductAnalyticData value,
|
||||
$Res Function(ProductAnalyticData) then,
|
||||
) = _$ProductAnalyticDataCopyWithImpl<$Res, ProductAnalyticData>;
|
||||
@useResult
|
||||
$Res call({
|
||||
String productId,
|
||||
String productName,
|
||||
String categoryId,
|
||||
String categoryName,
|
||||
int quantitySold,
|
||||
double revenue,
|
||||
double averagePrice,
|
||||
int orderCount,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ProductAnalyticDataCopyWithImpl<$Res, $Val extends ProductAnalyticData>
|
||||
implements $ProductAnalyticDataCopyWith<$Res> {
|
||||
_$ProductAnalyticDataCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ProductAnalyticData
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? productId = null,
|
||||
Object? productName = null,
|
||||
Object? categoryId = null,
|
||||
Object? categoryName = null,
|
||||
Object? quantitySold = null,
|
||||
Object? revenue = null,
|
||||
Object? averagePrice = null,
|
||||
Object? orderCount = null,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
productId: null == productId
|
||||
? _value.productId
|
||||
: productId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
productName: null == productName
|
||||
? _value.productName
|
||||
: productName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
categoryId: null == categoryId
|
||||
? _value.categoryId
|
||||
: categoryId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
categoryName: null == categoryName
|
||||
? _value.categoryName
|
||||
: categoryName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
quantitySold: null == quantitySold
|
||||
? _value.quantitySold
|
||||
: quantitySold // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
revenue: null == revenue
|
||||
? _value.revenue
|
||||
: revenue // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
averagePrice: null == averagePrice
|
||||
? _value.averagePrice
|
||||
: averagePrice // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
orderCount: null == orderCount
|
||||
? _value.orderCount
|
||||
: orderCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProductAnalyticDataImplCopyWith<$Res>
|
||||
implements $ProductAnalyticDataCopyWith<$Res> {
|
||||
factory _$$ProductAnalyticDataImplCopyWith(
|
||||
_$ProductAnalyticDataImpl value,
|
||||
$Res Function(_$ProductAnalyticDataImpl) then,
|
||||
) = __$$ProductAnalyticDataImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
String productId,
|
||||
String productName,
|
||||
String categoryId,
|
||||
String categoryName,
|
||||
int quantitySold,
|
||||
double revenue,
|
||||
double averagePrice,
|
||||
int orderCount,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProductAnalyticDataImplCopyWithImpl<$Res>
|
||||
extends _$ProductAnalyticDataCopyWithImpl<$Res, _$ProductAnalyticDataImpl>
|
||||
implements _$$ProductAnalyticDataImplCopyWith<$Res> {
|
||||
__$$ProductAnalyticDataImplCopyWithImpl(
|
||||
_$ProductAnalyticDataImpl _value,
|
||||
$Res Function(_$ProductAnalyticDataImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of ProductAnalyticData
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? productId = null,
|
||||
Object? productName = null,
|
||||
Object? categoryId = null,
|
||||
Object? categoryName = null,
|
||||
Object? quantitySold = null,
|
||||
Object? revenue = null,
|
||||
Object? averagePrice = null,
|
||||
Object? orderCount = null,
|
||||
}) {
|
||||
return _then(
|
||||
_$ProductAnalyticDataImpl(
|
||||
productId: null == productId
|
||||
? _value.productId
|
||||
: productId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
productName: null == productName
|
||||
? _value.productName
|
||||
: productName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
categoryId: null == categoryId
|
||||
? _value.categoryId
|
||||
: categoryId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
categoryName: null == categoryName
|
||||
? _value.categoryName
|
||||
: categoryName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
quantitySold: null == quantitySold
|
||||
? _value.quantitySold
|
||||
: quantitySold // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
revenue: null == revenue
|
||||
? _value.revenue
|
||||
: revenue // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
averagePrice: null == averagePrice
|
||||
? _value.averagePrice
|
||||
: averagePrice // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
orderCount: null == orderCount
|
||||
? _value.orderCount
|
||||
: orderCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$ProductAnalyticDataImpl implements _ProductAnalyticData {
|
||||
const _$ProductAnalyticDataImpl({
|
||||
required this.productId,
|
||||
required this.productName,
|
||||
required this.categoryId,
|
||||
required this.categoryName,
|
||||
required this.quantitySold,
|
||||
required this.revenue,
|
||||
required this.averagePrice,
|
||||
required this.orderCount,
|
||||
});
|
||||
|
||||
@override
|
||||
final String productId;
|
||||
@override
|
||||
final String productName;
|
||||
@override
|
||||
final String categoryId;
|
||||
@override
|
||||
final String categoryName;
|
||||
@override
|
||||
final int quantitySold;
|
||||
@override
|
||||
final double revenue;
|
||||
@override
|
||||
final double averagePrice;
|
||||
@override
|
||||
final int orderCount;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ProductAnalyticData(productId: $productId, productName: $productName, categoryId: $categoryId, categoryName: $categoryName, quantitySold: $quantitySold, revenue: $revenue, averagePrice: $averagePrice, orderCount: $orderCount)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ProductAnalyticDataImpl &&
|
||||
(identical(other.productId, productId) ||
|
||||
other.productId == productId) &&
|
||||
(identical(other.productName, productName) ||
|
||||
other.productName == productName) &&
|
||||
(identical(other.categoryId, categoryId) ||
|
||||
other.categoryId == categoryId) &&
|
||||
(identical(other.categoryName, categoryName) ||
|
||||
other.categoryName == categoryName) &&
|
||||
(identical(other.quantitySold, quantitySold) ||
|
||||
other.quantitySold == quantitySold) &&
|
||||
(identical(other.revenue, revenue) || other.revenue == revenue) &&
|
||||
(identical(other.averagePrice, averagePrice) ||
|
||||
other.averagePrice == averagePrice) &&
|
||||
(identical(other.orderCount, orderCount) ||
|
||||
other.orderCount == orderCount));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
productId,
|
||||
productName,
|
||||
categoryId,
|
||||
categoryName,
|
||||
quantitySold,
|
||||
revenue,
|
||||
averagePrice,
|
||||
orderCount,
|
||||
);
|
||||
|
||||
/// Create a copy of ProductAnalyticData
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProductAnalyticDataImplCopyWith<_$ProductAnalyticDataImpl> get copyWith =>
|
||||
__$$ProductAnalyticDataImplCopyWithImpl<_$ProductAnalyticDataImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
}
|
||||
|
||||
abstract class _ProductAnalyticData implements ProductAnalyticData {
|
||||
const factory _ProductAnalyticData({
|
||||
required final String productId,
|
||||
required final String productName,
|
||||
required final String categoryId,
|
||||
required final String categoryName,
|
||||
required final int quantitySold,
|
||||
required final double revenue,
|
||||
required final double averagePrice,
|
||||
required final int orderCount,
|
||||
}) = _$ProductAnalyticDataImpl;
|
||||
|
||||
@override
|
||||
String get productId;
|
||||
@override
|
||||
String get productName;
|
||||
@override
|
||||
String get categoryId;
|
||||
@override
|
||||
String get categoryName;
|
||||
@override
|
||||
int get quantitySold;
|
||||
@override
|
||||
double get revenue;
|
||||
@override
|
||||
double get averagePrice;
|
||||
@override
|
||||
int get orderCount;
|
||||
|
||||
/// Create a copy of ProductAnalyticData
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProductAnalyticDataImplCopyWith<_$ProductAnalyticDataImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$AnalyticFailure {
|
||||
@optionalTypeArgs
|
||||
|
||||
Reference in New Issue
Block a user