test: stop wiping admin user during integration tests #29
@@ -0,0 +1,22 @@
|
|||||||
|
package com.fabledsword.minstrel.models.wire
|
||||||
|
|
||||||
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wire shape for `GET /api/albums/{id}` — server returns AlbumRef
|
||||||
|
* fields PLUS an embedded `tracks` array.
|
||||||
|
*/
|
||||||
|
@Serializable
|
||||||
|
data class AlbumDetailWire(
|
||||||
|
val id: String,
|
||||||
|
val title: String,
|
||||||
|
@SerialName("artist_id") val artistId: String,
|
||||||
|
@SerialName("sort_title") val sortTitle: String = "",
|
||||||
|
@SerialName("artist_name") val artistName: String = "",
|
||||||
|
val year: Int? = null,
|
||||||
|
@SerialName("track_count") val trackCount: Int = 0,
|
||||||
|
@SerialName("duration_sec") val durationSec: Int = 0,
|
||||||
|
@SerialName("cover_url") val coverUrl: String = "",
|
||||||
|
val tracks: List<TrackWire> = emptyList(),
|
||||||
|
)
|
||||||
@@ -18,21 +18,3 @@ data class AlbumWire(
|
|||||||
@SerialName("duration_sec") val durationSec: Int = 0,
|
@SerialName("duration_sec") val durationSec: Int = 0,
|
||||||
@SerialName("cover_url") val coverUrl: String = "",
|
@SerialName("cover_url") val coverUrl: String = "",
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
|
||||||
* Wire shape for `GET /api/albums/{id}` — server returns AlbumRef
|
|
||||||
* fields PLUS an embedded `tracks` array.
|
|
||||||
*/
|
|
||||||
@Serializable
|
|
||||||
data class AlbumDetailWire(
|
|
||||||
val id: String,
|
|
||||||
val title: String,
|
|
||||||
@SerialName("artist_id") val artistId: String,
|
|
||||||
@SerialName("sort_title") val sortTitle: String = "",
|
|
||||||
@SerialName("artist_name") val artistName: String = "",
|
|
||||||
val year: Int? = null,
|
|
||||||
@SerialName("track_count") val trackCount: Int = 0,
|
|
||||||
@SerialName("duration_sec") val durationSec: Int = 0,
|
|
||||||
@SerialName("cover_url") val coverUrl: String = "",
|
|
||||||
val tracks: List<TrackWire> = emptyList(),
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.fabledsword.minstrel.models.wire
|
||||||
|
|
||||||
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wire shape for `GET /api/artists/{id}` — server returns ArtistRef
|
||||||
|
* fields PLUS an embedded `albums` array.
|
||||||
|
*/
|
||||||
|
@Serializable
|
||||||
|
data class ArtistDetailWire(
|
||||||
|
val id: String,
|
||||||
|
val name: String,
|
||||||
|
@SerialName("sort_name") val sortName: String = "",
|
||||||
|
@SerialName("album_count") val albumCount: Int = 0,
|
||||||
|
@SerialName("cover_url") val coverUrl: String = "",
|
||||||
|
val albums: List<AlbumWire> = emptyList(),
|
||||||
|
)
|
||||||
@@ -14,20 +14,3 @@ data class ArtistWire(
|
|||||||
@SerialName("album_count") val albumCount: Int = 0,
|
@SerialName("album_count") val albumCount: Int = 0,
|
||||||
@SerialName("cover_url") val coverUrl: String = "",
|
@SerialName("cover_url") val coverUrl: String = "",
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
|
||||||
* Wire shape for `GET /api/artists/{id}` — server returns ArtistRef
|
|
||||||
* fields PLUS an embedded `albums` array. We can't directly map this
|
|
||||||
* to ArtistWire because Retrofit/kotlinx.serialization doesn't support
|
|
||||||
* a single record being two types; an explicit DetailWire spells out
|
|
||||||
* both halves and the repository handles the split.
|
|
||||||
*/
|
|
||||||
@Serializable
|
|
||||||
data class ArtistDetailWire(
|
|
||||||
val id: String,
|
|
||||||
val name: String,
|
|
||||||
@SerialName("sort_name") val sortName: String = "",
|
|
||||||
@SerialName("album_count") val albumCount: Int = 0,
|
|
||||||
@SerialName("cover_url") val coverUrl: String = "",
|
|
||||||
val albums: List<AlbumWire> = emptyList(),
|
|
||||||
)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user