//
//  RegisteredUser.swift
//  Werkout_ios
//
//  Created by Trey Tartt on 6/14/23.
//

import Foundation

struct RegisteredUser: Codable, Hashable {
    let id: Int
    let firstName, lastName, image: String?
    let nickName: String?
    let token: String?
    let email: String?
    let hasNSFWToggle: Bool?
    
    enum CodingKeys: String, CodingKey {
        case id
        case firstName = "first_name"
        case lastName = "last_name"
        case image, token
        case email = "email_address"
        case nickName = "nick_name"
        case hasNSFWToggle = "has_nsfw_toggle"
    }
    
    var NSFWValue: Bool {
        return hasNSFWToggle ?? false
    }
}
