A app/src/main/java/com/github/nacabaro/vbhelper/daos/DiMDao.kt => app/src/main/java/com/github/nacabaro/vbhelper/daos/DiMDao.kt +16 -0
@@ 0,0 1,16 @@
+package com.github.nacabaro.vbhelper.daos
+
+import androidx.room.Dao
+import androidx.room.Insert
+import androidx.room.Query
+import com.github.nacabaro.vbhelper.domain.Dim
+import kotlinx.coroutines.flow.Flow
+
+@Dao
+interface DiMDao {
+ @Insert
+ suspend fun insertNewDim(dim: Dim)
+
+ @Query("SELECT * FROM Dim")
+ fun getAllDims(): Flow<List<Dim>>
+}<
\ No newline at end of file
A app/src/main/java/com/github/nacabaro/vbhelper/daos/DiMProgressDao.kt => app/src/main/java/com/github/nacabaro/vbhelper/daos/DiMProgressDao.kt +11 -0
@@ 0,0 1,11 @@
+package com.github.nacabaro.vbhelper.daos
+
+import androidx.room.Dao
+import androidx.room.Upsert
+import com.github.nacabaro.vbhelper.domain.DimProgress
+
+@Dao
+interface DiMProgressDao {
+ @Upsert
+ suspend fun updateDimProgress(vararg dimProgress: DimProgress)
+}<
\ No newline at end of file
A app/src/main/java/com/github/nacabaro/vbhelper/daos/UserMonstersTransformationHistoryDao.kt => app/src/main/java/com/github/nacabaro/vbhelper/daos/UserMonstersTransformationHistoryDao.kt +11 -0
@@ 0,0 1,11 @@
+package com.github.nacabaro.vbhelper.daos
+
+import androidx.room.Dao
+import androidx.room.Insert
+import com.github.nacabaro.vbhelper.temporary_domain.TemporaryTransformationHistory
+
+@Dao
+interface UserMonstersTransformationHistoryDao {
+ @Insert
+ fun insertTransformations(vararg transformations: TemporaryTransformationHistory)
+}<
\ No newline at end of file
A app/src/main/java/com/github/nacabaro/vbhelper/dtos/MonsterDataCombined.kt => app/src/main/java/com/github/nacabaro/vbhelper/dtos/MonsterDataCombined.kt +4 -0
@@ 0,0 1,4 @@
+package com.github.nacabaro.vbhelper.dtos
+
+class MonsterDataCombined {
+}<
\ No newline at end of file
A app/src/main/java/com/github/nacabaro/vbhelper/temporary_domain/TemporaryBECharacterData.kt => app/src/main/java/com/github/nacabaro/vbhelper/temporary_domain/TemporaryBECharacterData.kt +42 -0
@@ 0,0 1,42 @@
+package com.github.nacabaro.vbhelper.temporary_domain
+
+import androidx.room.Entity
+import androidx.room.ForeignKey
+import androidx.room.PrimaryKey
+import com.github.cfogrady.vbnfc.be.FirmwareVersion
+import com.github.cfogrady.vbnfc.data.NfcCharacter
+
+@Entity(
+ foreignKeys = [
+ ForeignKey(
+ entity = TemporaryCharacterData::class,
+ parentColumns = ["id"],
+ childColumns = ["userId"],
+ onDelete = ForeignKey.CASCADE
+ )
+ ]
+)
+data class TemporaryBECharacterData (
+ @PrimaryKey(autoGenerate = true) val id: Int,
+ val trainingHp: UShort,
+ val trainingAp: UShort,
+ val trainingBp: UShort,
+ val remainingTrainingTimeInMinutes: UShort,
+ val itemEffectMentalStateValue: Byte,
+ val itemEffectMentalStateMinutesRemaining: Byte,
+ val itemEffectActivityLevelValue: Byte,
+ val itemEffectActivityLevelMinutesRemaining: Byte,
+ val itemEffectVitalPointsChangeValue: Byte,
+ val itemEffectVitalPointsChangeMinutesRemaining: Byte,
+ val abilityRarity: NfcCharacter.AbilityRarity,
+ val abilityType: UShort,
+ val abilityBranch: UShort,
+ val abilityReset: Byte,
+ val rank: Byte,
+ val itemType: Byte,
+ val itemMultiplier: Byte,
+ val itemRemainingTime: Byte,
+ val otp0: String,
+ val otp1: String,
+ var characterCreationFirmwareVersion: FirmwareVersion,
+)<
\ No newline at end of file
A app/src/main/java/com/github/nacabaro/vbhelper/temporary_domain/TemporaryCharacterData.kt => app/src/main/java/com/github/nacabaro/vbhelper/temporary_domain/TemporaryCharacterData.kt +49 -0
@@ 0,0 1,49 @@
+package com.github.nacabaro.vbhelper.temporary_domain
+
+import androidx.room.Entity
+import androidx.room.PrimaryKey
+import com.github.cfogrady.vbnfc.data.NfcCharacter
+
+/*
+dimId=16,
+charIndex=8,
+stage=4,
+attribute=Free,
+ageInDays=0,
+nextAdventureMissionStage=9,
+mood=99,
+vitalPoints=9999,
+transformationCountdown=1101,
+injuryStatus=None,
+trophies=0,
+currentPhaseBattlesWon=19,
+currentPhaseBattlesLost=4,
+totalBattlesWon=36,
+totalBattlesLost=10,
+activityLevel=0,
+heartRateCurrent=71,
+*/
+
+
+@Entity
+data class TemporaryCharacterData (
+ @PrimaryKey(autoGenerate = true) val id: Int,
+ val dimId: UShort,
+ var charIndex: UShort,
+ var stage: Byte,
+ var attribute: NfcCharacter.Attribute,
+ var ageInDays: Byte,
+ var nextAdventureMissionStage: Byte, // next adventure mission stage on the character's dim
+ var mood: Byte,
+ var vitalPoints: UShort,
+ var transformationCountdown: UShort,
+ var injuryStatus: NfcCharacter.InjuryStatus,
+ var trophies: UShort,
+ var currentPhaseBattlesWon: UShort,
+ var currentPhaseBattlesLost: UShort,
+ var totalBattlesWon: UShort,
+ var totalBattlesLost: UShort,
+ var activityLevel: Byte,
+ var heartRateCurrent: UByte,
+ var transformationHistory: Int
+)<
\ No newline at end of file
A app/src/main/java/com/github/nacabaro/vbhelper/temporary_domain/TemporaryTransformationHistory.kt => app/src/main/java/com/github/nacabaro/vbhelper/temporary_domain/TemporaryTransformationHistory.kt +13 -0
@@ 0,0 1,13 @@
+package com.github.nacabaro.vbhelper.temporary_domain
+
+import androidx.room.Entity
+
+@Entity
+// Bit lazy, will correct later...
+data class TemporaryTransformationHistory (
+ val monId: Int,
+ val toCharIndex: Byte,
+ val yearsSince1988: Byte,
+ val month: Byte,
+ val day: Byte
+)