blob: ca2703b322fa37b54a4cf1212f78b7b70436a909 (
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
|
using System;
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!;
[Column("content_type"), Required]
public string ContentType { get; set; } = default!;
[Column("content")]
public string? Content { get; set; }
[Column("time")]
public DateTime Time { get; set; }
[Column("last_updated")]
public DateTime LastUpdated { get; set; }
}
}
|