aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Entities/TimelinePostEntity.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-11-20 18:21:17 +0800
committerGitHub <noreply@github.com>2019-11-20 18:21:17 +0800
commit751467deb8ae18909ebd2b241bbb64f1f9da8295 (patch)
tree788b8acdf1141c757cb3226d3cd5f64594386b8f /Timeline/Entities/TimelinePostEntity.cs
parent2de7fa95bb5ad0a10f74fb390bac464a250dee42 (diff)
parent33318b9244a82fee6d711aa15f853e1590ff13f7 (diff)
downloadtimeline-751467deb8ae18909ebd2b241bbb64f1f9da8295.tar.gz
timeline-751467deb8ae18909ebd2b241bbb64f1f9da8295.tar.bz2
timeline-751467deb8ae18909ebd2b241bbb64f1f9da8295.zip
Merge pull request #54 from crupest/timeline
Add core feature Timeline (currently only personal timeline)
Diffstat (limited to 'Timeline/Entities/TimelinePostEntity.cs')
-rw-r--r--Timeline/Entities/TimelinePostEntity.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/Timeline/Entities/TimelinePostEntity.cs b/Timeline/Entities/TimelinePostEntity.cs
new file mode 100644
index 00000000..efef3ab5
--- /dev/null
+++ b/Timeline/Entities/TimelinePostEntity.cs
@@ -0,0 +1,34 @@
+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("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 User Author { 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; }
+ }
+}