35 lines
1015 B
Swift
35 lines
1015 B
Swift
//
|
|
// Subscribe.swift
|
|
// Befund
|
|
//
|
|
// Created by Irakli Abetschkhrischwili on 15.05.22.
|
|
// Copyright © 2022 MVZ Dr. Stein und Kollegen. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
extension Core.Models.Request
|
|
{
|
|
public class Subscribe : Encodable, Decodable
|
|
{
|
|
public var pgs: String? = nil
|
|
public var pgs_hash: String? = nil
|
|
public var udid: String? = nil
|
|
public var device_token: String? = nil
|
|
public var device_type = 1
|
|
public var client_public_key: String? = nil
|
|
public var verificator_hash: String? = nil
|
|
public var pin: String? = nil
|
|
|
|
/**
|
|
* Converts subscribe request object to the database results object
|
|
*/
|
|
public func ToResults() -> Core.Models.Database.Results
|
|
{
|
|
var result = Core.Models.Database.Results()
|
|
result.pgs = self.pgs
|
|
result.status = Core.Models.Database.Results.ResultsStatus.NONE.rawValue
|
|
return result
|
|
}
|
|
}
|
|
}
|