aboutsummaryrefslogtreecommitdiff
path: root/Timeline
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-08-24 22:24:04 +0800
committer杨宇千 <crupest@outlook.com>2019-08-24 22:24:04 +0800
commitea67db0b2971271612a2fdf9631b1fe4d6ca7e07 (patch)
treef5419e5d6117b329c8e1d17a1a88e81acc9d5909 /Timeline
parent11f01c56b4ea1dbb09d04258bec89f800c6ee2b6 (diff)
downloadtimeline-ea67db0b2971271612a2fdf9631b1fe4d6ca7e07.tar.gz
timeline-ea67db0b2971271612a2fdf9631b1fe4d6ca7e07.tar.bz2
timeline-ea67db0b2971271612a2fdf9631b1fe4d6ca7e07.zip
Rename EMail to Email.
Diffstat (limited to 'Timeline')
-rw-r--r--Timeline/Entities/UserDetail.cs2
-rw-r--r--Timeline/Models/UserDetail.cs6
-rw-r--r--Timeline/Services/UserDetailService.cs4
3 files changed, 7 insertions, 5 deletions
diff --git a/Timeline/Entities/UserDetail.cs b/Timeline/Entities/UserDetail.cs
index 6e582234..bc14dbe6 100644
--- a/Timeline/Entities/UserDetail.cs
+++ b/Timeline/Entities/UserDetail.cs
@@ -16,7 +16,7 @@ namespace Timeline.Entities
public string QQ { get; set; }
[Column("email"), MaxLength(50)]
- public string EMail { get; set; }
+ public string Email { get; set; }
[Column("phone_number"), MaxLength(15)]
public string PhoneNumber { get; set; }
diff --git a/Timeline/Models/UserDetail.cs b/Timeline/Models/UserDetail.cs
index 86866d8b..1a6c0c6a 100644
--- a/Timeline/Models/UserDetail.cs
+++ b/Timeline/Models/UserDetail.cs
@@ -1,6 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Timeline.Entities;
using Timeline.Models.Validation;
+using Newtonsoft.Json;
namespace Timeline.Models
{
@@ -10,10 +11,11 @@ namespace Timeline.Models
public string Nickname { get; set; }
[ValidateWith(typeof(UserDetailValidators.QQValidator))]
+ [JsonProperty(PropertyName = "qq")]
public string QQ { get; set; }
[ValidateWith(typeof(UserDetailValidators.EMailValidator))]
- public string EMail { get; set; }
+ public string Email { get; set; }
[ValidateWith(typeof(UserDetailValidators.PhoneNumberValidator))]
public string PhoneNumber { get; set; }
@@ -34,7 +36,7 @@ namespace Timeline.Models
{
Nickname = CoerceEmptyToNull(entity.Nickname),
QQ = CoerceEmptyToNull(entity.QQ),
- EMail = CoerceEmptyToNull(entity.EMail),
+ Email = CoerceEmptyToNull(entity.Email),
PhoneNumber = CoerceEmptyToNull(entity.PhoneNumber),
Description = CoerceEmptyToNull(entity.Description)
};
diff --git a/Timeline/Services/UserDetailService.cs b/Timeline/Services/UserDetailService.cs
index a8ed662b..5e049435 100644
--- a/Timeline/Services/UserDetailService.cs
+++ b/Timeline/Services/UserDetailService.cs
@@ -111,8 +111,8 @@ namespace Timeline.Services
if (detail.QQ != null)
detailEntity.QQ = detail.QQ;
- if (detail.EMail != null)
- detailEntity.EMail = detail.EMail;
+ if (detail.Email != null)
+ detailEntity.Email = detail.Email;
if (detail.PhoneNumber != null)
detailEntity.PhoneNumber = detail.PhoneNumber;