-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUser.cs
47 lines (30 loc) · 947 Bytes
/
User.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace stationMeteo
{
public class User
{
public int ID {get; set;}
public String username { get; set; }
public String password { get; set; }
public Permission permission { get; set; }
public User(Dictionary<String, Object> json)
{
this.ID = int.Parse(json["ID"].ToString());
this.username = json["username"].ToString();
this.password = json["password"].ToString();
this.permission = new Permission((Dictionary<String, Object>)json["permission"]);
}
public override String ToString()
{
return "[" +
this.ID + "-" +
this.username + "-" +
this.password + "-" +
this.permission + "]";
}
}
}