-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
95 additions
and
5 deletions.
There are no files selected for viewing
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
File renamed without changes.
53 changes: 53 additions & 0 deletions
53
app/src/main/java/igrek/songbook/admin/antechamber/ChordsSongDto.kt
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,53 @@ | ||
package igrek.songbook.admin.antechamber | ||
|
||
import igrek.songbook.persistence.general.model.Song | ||
import igrek.songbook.settings.chordsnotation.ChordsNotation | ||
|
||
data class ChordsSongDto( | ||
var id: Long? = null, | ||
var title: String? = null, | ||
var categories: List<String> = emptyList(), | ||
var content: String? = null, | ||
var version_number: Long? = 1, | ||
var create_time: Long? = 0, | ||
var update_time: Long? = 0, | ||
var language: String? = null, | ||
var chords_notation: Long? = null, | ||
var author: String? = null, | ||
var preferred_key: String? = null, | ||
var metre: String? = null, | ||
var comment: String? = null, | ||
var is_locked: Boolean? = false, | ||
var lock_password: String? = null, | ||
var scroll_speed: Double? = null, | ||
var initial_delay: Double? = null, | ||
var state: Long? = null, | ||
var rank: Double? = null, | ||
var tags: String? = null | ||
) { | ||
|
||
companion object { | ||
fun fromModel(song: Song): ChordsSongDto = ChordsSongDto( | ||
id = song.id, | ||
title = song.title, | ||
categories = emptyList(), | ||
content = song.content, | ||
version_number = song.versionNumber, | ||
create_time = song.createTime, | ||
update_time = song.updateTime, | ||
language = song.language, | ||
chords_notation = (song.chordsNotation ?: ChordsNotation.default).id, | ||
author = song.author, | ||
preferred_key = song.preferredKey, | ||
metre = song.metre, | ||
comment = song.comment, | ||
is_locked = song.locked, | ||
lock_password = song.lockPassword, | ||
scroll_speed = song.scrollSpeed, | ||
initial_delay = song.initialDelay, | ||
state = song.status.id, | ||
rank = song.rank, | ||
tags = song.tags | ||
) | ||
} | ||
} |
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
Binary file not shown.