aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Entities/TimelinePostEntity.cs
blob: 451f56cd86878cfbac155e4087b297321056f369 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Timeline.Entities
{
    [Table("timeline_posts")]
    public class TimelinePostEntity
    {
        [Column("id"), Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long Id { get; set; }

        [Column("local_id")]
        public long LocalId { get; set; }

        [Column("timeline")]
        public long TimelineId { get; set; }

        [ForeignKey(nameof(TimelineId))]
        public TimelineEntity Timeline { get; set; } = default!;

        [Column("author")]
        public long? AuthorId { get; set; }

        [ForeignKey(nameof(AuthorId))]
        public UserEntity? Author { get; set; } = default!;

        [Obsolete("Use post data instead.")]
        [Column("content_type")]
        public string? ContentType { get; set; }

        [Obsolete("Use post data instead.")]
        [Column("content")]
        public string? Content { get; set; }

        [Obsolete("Use post data instead.")]
        [Column("extra_content")]
        public string? ExtraContent { get; set; }

        [Column("deleted")]
        public bool Deleted { get; set; }

        [Column("color")]
        public string? Color { get; set; }

        [Column("time")]
        public DateTime Time { get; set; }

        [Column("last_updated")]
        public DateTime LastUpdated { get; set; }

#pragma warning disable CA2227
        public List<TimelinePostDataEntity> DataList { get; set; } = default!;
#pragma warning restore CA2227
    }
}