-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUser.swift
49 lines (34 loc) · 947 Bytes
/
User.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// User.swift
// a1bank
//
// Created by Panagiotis Papasyamatis on 10/05/2016.
// Copyright © 2016 Panagiotis Papastamatis. All rights reserved.
//
import Foundation
class User: Hashable {
var id: Int32
var firstName: String
var lastName: String
var userName: String
var password: String
var email: String
var dateOfBirth: NSDate
init(id: Int32, userName: String, password: String, firstName: String, lastName: String, email: String, dateOfBirth: NSDate) {
self.id = id
self.userName = userName
self.password = password
self.firstName = firstName
self.lastName = lastName
self.email = email
self.dateOfBirth = dateOfBirth
}
var hashValue: Int {
get {
return self.id.hashValue
}
}
}
func ==(lhs: User, rhs: User) -> Bool {
return lhs.id == rhs.id
}