forked from SteamWar/SteamWar
Refactor EventRelation: Fix query logic for byEvent, adjust insert fields, and update setFrom parameter handling. Update ResponseRelation to align with updated EventRelation structure.
This commit is contained in:
@@ -63,7 +63,8 @@ data class ResponseGroups(
|
||||
@Serializable
|
||||
data class ResponseRelation(
|
||||
val id: Int,
|
||||
val fight: ResponseEventFight,
|
||||
val fight: Int,
|
||||
val team: EventRelation.FightTeam,
|
||||
val type: FromType,
|
||||
val fromFight: ResponseEventFight? = null,
|
||||
val fromGroup: ResponseGroups? = null,
|
||||
@@ -71,7 +72,8 @@ data class ResponseRelation(
|
||||
) {
|
||||
constructor(relation: EventRelation) : this(
|
||||
relation.id,
|
||||
ResponseEventFight(relation.fight),
|
||||
relation.fightId,
|
||||
relation.fightTeam,
|
||||
relation.fromType,
|
||||
relation.fromFight.map { ResponseEventFight(it) }.orElse(null),
|
||||
relation.fromGroup.map { ResponseGroups(it) }.orElse(null),
|
||||
|
||||
Reference in New Issue
Block a user