feat: category analytic source
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
part of '../analytic.dart';
|
||||
|
||||
@freezed
|
||||
class CategoryAnalytic with _$CategoryAnalytic {
|
||||
const factory CategoryAnalytic({
|
||||
required String organizationId,
|
||||
required String outletId,
|
||||
required String dateFrom,
|
||||
required String dateTo,
|
||||
required List<CategoryAnalyticItem> data,
|
||||
}) = _CategoryAnalytic;
|
||||
|
||||
factory CategoryAnalytic.empty() => const CategoryAnalytic(
|
||||
organizationId: "",
|
||||
outletId: "",
|
||||
dateFrom: "",
|
||||
dateTo: "",
|
||||
data: [],
|
||||
);
|
||||
}
|
||||
|
||||
@freezed
|
||||
class CategoryAnalyticItem with _$CategoryAnalyticItem {
|
||||
const factory CategoryAnalyticItem({
|
||||
required String categoryId,
|
||||
required String categoryName,
|
||||
required int totalRevenue,
|
||||
required int totalQuantity,
|
||||
required int productCount,
|
||||
required int orderCount,
|
||||
}) = _CategoryAnalyticItem;
|
||||
|
||||
factory CategoryAnalyticItem.empty() => const CategoryAnalyticItem(
|
||||
categoryId: "",
|
||||
categoryName: "",
|
||||
totalRevenue: 0,
|
||||
totalQuantity: 0,
|
||||
productCount: 0,
|
||||
orderCount: 0,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user