aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Models/Http/HttpTimelinePostCreateRequest.cs
blob: 2a973c72e045b45d659ff319fb19ef28bc2a3d95 (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
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Timeline.Models.Validation;

namespace Timeline.Models.Http
{
    public class HttpTimelinePostCreateRequest
    {
        /// <summary>
        /// Data list of the new content.
        /// </summary>
        [Required]
        [MinLength(1)]
        [MaxLength(100)]
#pragma warning disable CA2227
        public List<HttpTimelinePostCreateRequestData> DataList { get; set; } = default!;
#pragma warning restore CA2227

        /// <summary>
        /// Time of the post. If not set, current time will be used.
        /// </summary>
        public DateTime? Time { get; set; }

        /// <summary>
        /// Color of the post.
        /// </summary>
        [Color]
        public string? Color { get; set; }
    }
}