diff options
author | crupest <crupest@outlook.com> | 2020-12-18 14:56:02 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-12-18 14:56:02 +0800 |
commit | 3327f59c25138c66ecb637a0a90ce8ccc58db2e4 (patch) | |
tree | c6c858e5c67b92b419e535f3bf21102886ccd658 /BackEnd | |
parent | ebc2892d1546b8b59bd1c9adabe8a96a2e2a0754 (diff) | |
download | timeline-3327f59c25138c66ecb637a0a90ce8ccc58db2e4.tar.gz timeline-3327f59c25138c66ecb637a0a90ce8ccc58db2e4.tar.bz2 timeline-3327f59c25138c66ecb637a0a90ce8ccc58db2e4.zip |
feat(database): Add bookmark timeline database entity.
Diffstat (limited to 'BackEnd')
-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; }
+ }
+}
|