aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-12-18 14:56:02 +0800
committercrupest <crupest@outlook.com>2020-12-18 14:56:02 +0800
commit10956dbadfba39f38fcffcd5c144e6f0302ac5ee (patch)
treeb07053ef3ea23c5d4fe74ee640a86936077592b0 /BackEnd/Timeline
parent3b3c7c170f0070b0db85834b6c913b9060996d1d (diff)
downloadtimeline-10956dbadfba39f38fcffcd5c144e6f0302ac5ee.tar.gz
timeline-10956dbadfba39f38fcffcd5c144e6f0302ac5ee.tar.bz2
timeline-10956dbadfba39f38fcffcd5c144e6f0302ac5ee.zip
feat(database): Add bookmark timeline database entity.
Diffstat (limited to 'BackEnd/Timeline')
-rw-r--r--BackEnd/Timeline/Entities/BookmarkTimelineEntity.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Entities/BookmarkTimelineEntity.cs b/BackEnd/Timeline/Entities/BookmarkTimelineEntity.cs
new file mode 100644
index 00000000..99c0bc9b
--- /dev/null
+++ b/BackEnd/Timeline/Entities/BookmarkTimelineEntity.cs
@@ -0,0 +1,28 @@
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Timeline.Entities
+{
+ [Table("bookmark_timelines")]
+ public class BookmarkTimelineEntity
+ {
+ [Key, Column("id"), 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("user")]
+ public long UserId { get; set; }
+
+ [ForeignKey(nameof(UserId))]
+ public UserEntity User { get; set; } = default!;
+
+ // I don't use order any more since keyword name conflict.
+ [Column("rank")]
+ public long Rank { get; set; }
+ }
+}