46 lines
970 B
Swift
46 lines
970 B
Swift
//
|
|
// GameModeGroups.swift
|
|
// App
|
|
//
|
|
// Created by Michael Simard on 10/29/21.
|
|
//
|
|
|
|
import Fluent
|
|
import Vapor
|
|
|
|
final class GameModeGroup: Model, Content {
|
|
// Name of the table or collection.
|
|
static let schema = "game_mode_group"
|
|
|
|
@ID(key: .id)
|
|
var id: UUID?
|
|
|
|
@Field(key: "game_mode_ids")
|
|
var gameModeIds: String
|
|
|
|
@Field(key: "game_mode_group_id")
|
|
var gameModeGroupId: String
|
|
|
|
@Field(key: "name")
|
|
var name: String
|
|
|
|
|
|
|
|
|
|
// Creates a new, empty .
|
|
init() { }
|
|
|
|
// Creates a new with all properties set.
|
|
init(id: UUID? = nil, gameModeIds: String, name: String, gameModeGroupId:String) {
|
|
self.id = id
|
|
self.gameModeIds = gameModeIds
|
|
self.name = name
|
|
self.gameModeGroupId = gameModeGroupId
|
|
}
|
|
|
|
|
|
var gameModeGroupConfig: GameModeGroupConfig {
|
|
return GameModeGroupConfig(gameModeIds: gameModeIds, gameModeGroupId: gameModeGroupId, name: name)
|
|
}
|
|
}
|