 import Vapor
 import Authentication
-////import BCrypt
-//import Foundation
 
 // MARK: - Model
 
 public final class BlogUser: Codable {
-
-    // TODO
-//    public struct Properties {
-//        public static let userID = "id"
-//        public static let name = "name"
-//        public static let username = "username"
-//        public static let password = "password"
-//        public static let resetPasswordRequired = "reset_password_required"
-//        public static let profilePicture = "profile_picture"
-//        public static let twitterHandle = "twitter_handle"
-//        public static let biography = "biography"
-//        public static let tagline = "tagline"
-//        public static let postCount = "post_count"
-//    }
 
     public var userID: Int?
     public var name: String


}

//extension BlogUser: Migration {}


//extension BlogUser: Parameterizable {}
//
//// MARK: - Node
//
//public enum BlogUserContext: Context {
//    case withPostCount
//}
//
//extension BlogUser: NodeRepresentable {
//
//    public func makeNode(in context: Context?) throws -> Node {
//        var node = Node([:], in: context)
//        try node.set(Properties.userID, id)
//        try node.set(Properties.name, name)
//        try node.set(Properties.username, username)
//        try node.set(Properties.resetPasswordRequired, resetPasswordRequired)
//
//        if let profilePicture = profilePicture {
//            try node.set(Properties.profilePicture, profilePicture)
//        }
//
//        if let twitterHandle = twitterHandle {
//            try node.set(Properties.twitterHandle, twitterHandle)
//        }
//
//        if let biography = biography {
//            try node.set(Properties.biography, biography)
//        }
//
//        if let tagline = tagline {
//            try node.set(Properties.tagline, tagline)
//        }
//
//        guard let providedContext = context else {
//            return node
//        }
//
//        switch providedContext {
//        case BlogUserContext.withPostCount:
//            try node.set(Properties.postCount, try sortedPosts().count())
//        default:
//            break
//        }
//
//        return node
//    }
//
//}

// MARK: - Authentication

extension BlogUser: Authenticatable {

        try unauthenticate(BlogUser.self)
    }
}
