Skip to content

Commit

Permalink
[Domain] Added a model that will represent the chart gender data
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed May 23, 2022
1 parent ec36cb3 commit 9ea4bae
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/domain/models/charts/chart_gender_model.dart
@@ -0,0 +1,14 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:shiori/domain/enums/enums.dart';

part 'chart_gender_model.freezed.dart';

@freezed
class ChartGenderModel with _$ChartGenderModel {
const factory ChartGenderModel({
required int maleCount,
required int femaleCount,
required int maxCount,
required RegionType regionType,
}) = _ChartGenderModel;
}
1 change: 1 addition & 0 deletions lib/domain/models/models.dart
Expand Up @@ -19,6 +19,7 @@ export 'charts/chart_ascension_stat_model.dart';
export 'charts/chart_birthday_month_model.dart';
export 'charts/chart_character_region_model.dart';
export 'charts/chart_element_item_model.dart';
export 'charts/chart_gender_model.dart';
export 'charts/chart_top_item_model.dart';
export 'custom_builds/custom_build_artifact_model.dart';
export 'custom_builds/custom_build_model.dart';
Expand Down
3 changes: 3 additions & 0 deletions lib/domain/services/genshin_service.dart
Expand Up @@ -98,7 +98,10 @@ abstract class GenshinService {
List<ChartElementItemModel> getElementsForCharts(double fromVersion, double untilVersion);
List<ChartAscensionStatModel> getItemAscensionStatsForCharts(ItemType itemType);
List<ChartCharacterRegionModel> getCharacterRegionsForCharts();
List<ChartGenderModel> getCharacterGendersForCharts();
ChartGenderModel getCharacterGendersByRegionForCharts(RegionType regionType);
List<ItemCommonWithName> getCharactersForItemsByRegion(RegionType regionType);
List<ItemCommonWithName> getCharactersForItemsByRegionAndGender(RegionType regionType, bool onlyFemales);

List<CharacterBirthdayModel> getCharacterBirthdays({int? month, int? day});

Expand Down

0 comments on commit 9ea4bae

Please sign in to comment.