diff options
author | 杨宇千 <crupest@outlook.com> | 2019-11-03 00:28:21 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-11-03 00:28:21 +0800 |
commit | 71a444547673946a140db5bd0ed819932e392ccd (patch) | |
tree | be58859c6235b1be43bb0f989910257ce99f815b /Timeline/Entities/User.cs | |
parent | 2de7fa95bb5ad0a10f74fb390bac464a250dee42 (diff) | |
download | timeline-71a444547673946a140db5bd0ed819932e392ccd.tar.gz timeline-71a444547673946a140db5bd0ed819932e392ccd.tar.bz2 timeline-71a444547673946a140db5bd0ed819932e392ccd.zip |
Design the entity model primarily.
Diffstat (limited to 'Timeline/Entities/User.cs')
-rw-r--r-- | Timeline/Entities/User.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Timeline/Entities/User.cs b/Timeline/Entities/User.cs index 02352b03..e725a69a 100644 --- a/Timeline/Entities/User.cs +++ b/Timeline/Entities/User.cs @@ -1,4 +1,5 @@ -using System.ComponentModel.DataAnnotations;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Timeline.Entities
@@ -9,6 +10,7 @@ namespace Timeline.Entities public const string User = "user";
}
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "This is an entity class.")]
[Table("users")]
public class User
{
@@ -30,5 +32,11 @@ namespace Timeline.Entities public UserAvatar? Avatar { get; set; }
public UserDetail? Detail { get; set; }
+
+ public List<TimelineEntity> Timelines { get; set; } = default!;
+
+ public List<TimelinePostEntity> TimelinePosts { get; set; } = default!;
+
+ public List<TimelineMemberEntity> TimelinesJoined { get; set; } = default!;
}
}
|