aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Entities/User.cs
blob: b5664bb008bf7933abb08bfd6a2d07c13073745b (plain)
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
namespace Timeline.Entities
{
    public class CreateTokenRequest
    {
        public string Username { get; set; }
        public string Password { get; set; }
    }

    public class CreateTokenResponse
    {
        public bool Success { get; set; }
        public string Token { get; set; }
        public UserInfo UserInfo { get; set; }
    }

    public class VerifyTokenRequest
    {
        public string Token { get; set; }
    }

    public class VerifyTokenResponse
    {
        public bool IsValid { get; set; }
        public UserInfo UserInfo { get; set; }
    }

    public class CreateUserRequest
    {
        public string Username { get; set; }
        public string Password { get; set; }
        public string[] Roles { get; set; } 
    }

    public class CreateUserResponse
    {
        public const int SuccessCode = 0;
        public const int AlreadyExistsCode = 1;

        public int ReturnCode { get; set; }
    }
}