diff options
author | crupest <crupest@outlook.com> | 2020-11-26 20:02:03 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-11-26 20:02:03 +0800 |
commit | 080330966333fe61b6a9d5413c6b05b9ea77f4dc (patch) | |
tree | 69364aa51ae18083e75b486e3ab5bb6542061860 /BackEnd/Timeline/Entities/HighlightTimelineEntity.cs | |
parent | c69a18f66721404dac3a04a090d04bf248964a9f (diff) | |
download | timeline-080330966333fe61b6a9d5413c6b05b9ea77f4dc.tar.gz timeline-080330966333fe61b6a9d5413c6b05b9ea77f4dc.tar.bz2 timeline-080330966333fe61b6a9d5413c6b05b9ea77f4dc.zip |
feat: Add highlight timeline entity and service.
Diffstat (limited to 'BackEnd/Timeline/Entities/HighlightTimelineEntity.cs')
-rw-r--r-- | BackEnd/Timeline/Entities/HighlightTimelineEntity.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Entities/HighlightTimelineEntity.cs b/BackEnd/Timeline/Entities/HighlightTimelineEntity.cs new file mode 100644 index 00000000..0a38c8a6 --- /dev/null +++ b/BackEnd/Timeline/Entities/HighlightTimelineEntity.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Timeline.Entities
+{
+ [Table("highlight_timelines")]
+ public record HighlightTimelineEntity
+ {
+ [Key, Column("id"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public long Id { get; set; }
+
+ [Column("timeline_id")]
+ public long TimelineId { get; set; }
+
+ [ForeignKey(nameof(TimelineId))]
+ public TimelineEntity Timeline { get; set; } = default!;
+
+ [Column("operator_id")]
+ public long? OperatorId { get; set; }
+
+ [ForeignKey(nameof(OperatorId))]
+ public UserEntity? Operator { get; set; }
+ }
+}
|