Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Domain] Added a few models to represent the initial charts
- Loading branch information
Showing
8 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
enum ChartType { | ||
topFiveStarCharacterMostReruns, | ||
topFiveStarWeaponMostReruns, | ||
topFourStarCharacterMostReruns, | ||
topFourStarWeaponMostReruns, | ||
topFiveStarCharacterLeastReruns, | ||
topFiveStarWeaponLeastReruns, | ||
topFourStarCharacterLeastReruns, | ||
topFourStarWeaponLeastReruns, | ||
characterBirthdays, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
import 'package:shiori/domain/models/items/item_common.dart'; | ||
|
||
part 'chart_birthday_month_model.freezed.dart'; | ||
|
||
@freezed | ||
class ChartBirthdayMonthModel with _$ChartBirthdayMonthModel { | ||
const factory ChartBirthdayMonthModel({ | ||
required int month, | ||
required List<ItemCommonWithName> items, | ||
}) = _ChartBirthdayMonthModel; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import 'dart:math'; | ||
|
||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
import 'package:shiori/domain/enums/enums.dart'; | ||
|
||
part 'chart_element_item_model.freezed.dart'; | ||
|
||
@freezed | ||
class ChartElementItemModel with _$ChartElementItemModel { | ||
const factory ChartElementItemModel({ | ||
required ElementType type, | ||
required List<Point<double>> points, | ||
}) = _ChartElementItemModel; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
import 'package:shiori/domain/enums/enums.dart'; | ||
|
||
part 'chart_top_item_model.freezed.dart'; | ||
|
||
@freezed | ||
class ChartTopItemModel with _$ChartTopItemModel { | ||
const factory ChartTopItemModel({ | ||
required String key, | ||
required ChartType type, | ||
required String name, | ||
required int value, | ||
required double percentage, | ||
}) = _ChartTopItemModel; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters