mirror of
https://github.com/nacabaro/vbhelper.git
synced 2026-01-27 16:05:32 +00:00
Added temporary domain objects
This commit is contained in:
parent
e9eedb7429
commit
2f4bc9dba6
@ -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>>
|
||||
}
|
||||
@ -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)
|
||||
}
|
||||
@ -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)
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
package com.github.nacabaro.vbhelper.dtos
|
||||
|
||||
class MonsterDataCombined {
|
||||
}
|
||||
@ -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,
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
Loading…
x
Reference in New Issue
Block a user