From 97e6ac51ac4df58cd1229e7974d2b846b192558a Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 7 Jan 2021 20:12:00 +0800 Subject: refactor: Make mapper a service. Fix #202. --- BackEnd/Timeline/Entities/UserEntity.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'BackEnd/Timeline/Entities/UserEntity.cs') diff --git a/BackEnd/Timeline/Entities/UserEntity.cs b/BackEnd/Timeline/Entities/UserEntity.cs index 6a256a31..ad4d7db5 100644 --- a/BackEnd/Timeline/Entities/UserEntity.cs +++ b/BackEnd/Timeline/Entities/UserEntity.cs @@ -1,4 +1,5 @@ -using System; +using Microsoft.AspNetCore.Mvc; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -38,6 +39,10 @@ namespace Timeline.Entities public UserAvatarEntity? Avatar { get; set; } #pragma warning disable CA2227 // Collection properties should be read only + /// + /// Do not use this directly. Get permissions with . + /// + [Obsolete("Use IUserPermissionService instead.")] public List Permissions { get; set; } = default!; public List Timelines { get; set; } = default!; @@ -45,6 +50,11 @@ namespace Timeline.Entities public List TimelinePosts { get; set; } = default!; public List TimelinesJoined { get; set; } = default!; + + internal object MapToHttp(IUrlHelper url) + { + throw new NotImplementedException(); + } #pragma warning restore CA2227 // Collection properties should be read only } } -- cgit v1.2.3