map, player, game, gamemode data now database driven
This commit is contained in:
@@ -47,11 +47,14 @@ final class Match: Model, Content {
|
||||
var gameMode: Int
|
||||
|
||||
|
||||
@Field(key: "lossReason")
|
||||
var lossReason: Int
|
||||
|
||||
|
||||
|
||||
init() { }
|
||||
|
||||
init(id: UUID? = nil, map:String?, win:Bool, date:Date, roundsWon:Int?, roundsLost:Int?, codGame:String?, notes:String?, players:String?, sweaty:Bool?, finalKillRuinedPlayerId:Int?, numberOfFinalKillsRuined:Int?,competitive:Bool, gameMode:Int) {
|
||||
init(id: UUID? = nil, map:String?, win:Bool, date:Date, roundsWon:Int?, roundsLost:Int?, codGame:String?, notes:String?, players:String?, sweaty:Bool?, finalKillRuinedPlayerId:Int?, numberOfFinalKillsRuined:Int?,competitive:Bool, gameMode:Int, lossReason:Int) {
|
||||
self.id = id
|
||||
self.map = map
|
||||
self.win = win
|
||||
@@ -66,7 +69,7 @@ final class Match: Model, Content {
|
||||
self.numberOfFinalKillsRuined = numberOfFinalKillsRuined
|
||||
self.competitive = competitive
|
||||
self.gameMode = gameMode
|
||||
|
||||
self.lossReason = lossReason
|
||||
}
|
||||
|
||||
func update( newMatch:Match) {
|
||||
@@ -88,6 +91,7 @@ final class Match: Model, Content {
|
||||
self.numberOfFinalKillsRuined = newMatch.numberOfFinalKillsRuined
|
||||
self.competitive = newMatch.competitive
|
||||
self.gameMode = newMatch.gameMode
|
||||
self.lossReason = newMatch.lossReason
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user