-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/notifications
- Loading branch information
Showing
36 changed files
with
657 additions
and
734 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 was deleted.
Oops, something went wrong.
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,26 @@ | ||
import 'package:hive/hive.dart'; | ||
|
||
part 'game_code.g.dart'; | ||
|
||
@HiveType(typeId: 6) | ||
class GameCode extends HiveObject { | ||
@HiveField(0) | ||
final String code; | ||
|
||
@HiveField(1) | ||
DateTime usedOn; | ||
|
||
@HiveField(2) | ||
DateTime discoveredOn; | ||
|
||
@HiveField(3) | ||
DateTime expiredOn; | ||
|
||
@HiveField(4) | ||
bool isExpired; | ||
|
||
@HiveField(5) | ||
int region; | ||
|
||
GameCode(this.code, this.usedOn, this.discoveredOn, this.expiredOn, this.isExpired, this.region); | ||
} |
17 changes: 17 additions & 0 deletions
17
lib/domain/models/entities/game_code/game_code_reward.dart
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,17 @@ | ||
import 'package:hive/hive.dart'; | ||
|
||
part 'game_code_reward.g.dart'; | ||
|
||
@HiveType(typeId: 8) | ||
class GameCodeReward extends HiveObject { | ||
@HiveField(0) | ||
final int gameCodeKey; | ||
|
||
@HiveField(1) | ||
final String itemKey; | ||
|
||
@HiveField(2) | ||
final int quantity; | ||
|
||
GameCodeReward(this.gameCodeKey, this.itemKey, this.quantity); | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,16 +1,25 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:genshindb/domain/enums/enums.dart'; | ||
import 'package:genshindb/domain/models/models.dart'; | ||
|
||
class GameCodeModel { | ||
final String code; | ||
final AppServerResetTimeType region; | ||
|
||
final DateTime discoveredOn; | ||
final DateTime expiredOn; | ||
final bool isExpired; | ||
|
||
final bool isUsed; | ||
final List<ItemAscensionMaterialModel> rewards; | ||
|
||
GameCodeModel({ | ||
@required this.code, | ||
@required this.isExpired, | ||
@required this.isUsed, | ||
@required this.rewards, | ||
@required this.isExpired, | ||
@required this.discoveredOn, | ||
this.expiredOn, | ||
this.region, | ||
}); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import 'package:genshindb/domain/models/models.dart'; | ||
|
||
abstract class GameCodeService { | ||
Future<List<GameCodeModel>> getAllGameCodes(); | ||
} |
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
Oops, something went wrong.