aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models/Http/Timeline.cs
blob: 3029434e8a8733ddf7a34b96b9465aa790d7f694 (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
42
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Timeline.Models.Http
{
    public class TimelinePostCreateRequest
    {
        [Required(AllowEmptyStrings = true)]
        public string Content { get; set; } = default!;

        public DateTime? Time { get; set; }
    }

    public class TimelinePostCreateResponse
    {
        public long Id { get; set; }

        public DateTime Time { get; set; }
    }

    public class TimelinePostDeleteRequest
    {
        [Required]
        public long? Id { get; set; }
    }

    public class TimelinePropertyChangeRequest
    {
        public string? Description { get; set; }

        public TimelineVisibility? Visibility { get; set; }
    }

    [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "This is a DTO class.")]
    public class TimelineMemberChangeRequest
    {
        public List<string>? Add { get; set; }

        public List<string>? Remove { get; set; }
    }
}