aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Entities/Http/User.cs
blob: 24952ac7fea33862b863e9dbfa837fd4ec684a32 (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
namespace Timeline.Entities.Http
{
    public class UserModifyRequest
    {
        public string Password { get; set; }
        public string[] Roles { get; set; }
    }

    public static class UserPutResponse
    {
        public const int CreatedCode = 0;
        public const int ModifiedCode = 1;

        public static ReturnCodeMessageResponse Created { get; } = new ReturnCodeMessageResponse(CreatedCode, "A new user is created.");
        public static ReturnCodeMessageResponse Modified { get; } = new ReturnCodeMessageResponse(ModifiedCode, "A existing user is modified.");
    }

    public static class UserDeleteResponse
    {
        public const int DeletedCode = 0;
        public const int NotExistsCode = 1;

        public static ReturnCodeMessageResponse Deleted { get; } = new ReturnCodeMessageResponse(DeletedCode, "A existing user is deleted.");
        public static ReturnCodeMessageResponse NotExists { get; } = new ReturnCodeMessageResponse(NotExistsCode, "User with given name does not exists.");
    }
}