//
//  ResPushHistory.swift
//  Sailassist
//
//  Created by 三浦薫巳 on 2023/12/01.
//

import Foundation

//status
enum PushStatus: Int {
    case Unknown = 0
    case Normal = 1
    case Caution = 2
    case Warning = 3
    case Alarm = 4
    case Emergency = 5
    
    var title: String{
        switch self {
        case .Unknown:
            "Unknown"
        case .Normal:
            "Normal"
        case .Caution:
            "Caution"
        case .Warning:
            "Warning"
        case .Alarm:
            "Alerm"
        case .Emergency:
            "Emergency"
        }
    }
}

//type
enum PushType: Int{
    case RouteAlert = 0
    case BamAlert = 1
    case Emergency = 2
    case Chat = 3
    case SailassistTask = 4
}

struct ResPushHistory : Codable {
    var id: Int?
    var status: Int?
    var type: Int?
    var time: String?
    var shipId: Int?
    var shipName: String?
    var title: String?
    var message: String?
    var position: points?
    var emergencyId: String?
}
