diff options
author | crupest <crupest@outlook.com> | 2020-12-19 20:12:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-19 20:12:00 +0800 |
commit | 4b3ae3edd9e8aceac5ff26ef137d2a8d686fe305 (patch) | |
tree | 8dba18b84d996f1396423788525390fdde301210 /BackEnd/Timeline/Entities/BookmarkTimelineEntity.cs | |
parent | ebc2892d1546b8b59bd1c9adabe8a96a2e2a0754 (diff) | |
parent | 682b5a076c967f9f38dd32c0cffd4010548bd400 (diff) | |
download | timeline-4b3ae3edd9e8aceac5ff26ef137d2a8d686fe305.tar.gz timeline-4b3ae3edd9e8aceac5ff26ef137d2a8d686fe305.tar.bz2 timeline-4b3ae3edd9e8aceac5ff26ef137d2a8d686fe305.zip |
Merge pull request #194 from crupest/bookmark-timeline
Bookmark timeline.
Diffstat (limited to 'BackEnd/Timeline/Entities/BookmarkTimelineEntity.cs')
-rw-r--r-- | BackEnd/Timeline/Entities/BookmarkTimelineEntity.cs | 28 |
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; }
+ }
+}
|