WXUser.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using Newtonsoft.Json;
  6. using System.ComponentModel.DataAnnotations.Schema;
  7. namespace Winsoft.GOV.XF.WebApi.WXCore.Models
  8. {
  9. [JsonObject(MemberSerialization.OptOut)]
  10. public class WXUser
  11. {
  12. public WXUser()
  13. {
  14. CreateDate = DateTime.Now;
  15. }
  16. public int Id { get; set; }
  17. [JsonIgnore]
  18. public string OpenId { get; set; }
  19. public string Mobile { get; set; }
  20. //
  21. // 摘要:
  22. // 用户昵称
  23. public string Nickname { get; set; }
  24. //
  25. // 摘要:
  26. // 用户的性别,值为1时是男性,值为2时是女性,值为0时是未知
  27. public int Sex { get; set; }
  28. //
  29. // 摘要:
  30. // 用户个人资料填写的省份
  31. public string Province { get; set; }
  32. //
  33. // 摘要:
  34. // 普通用户个人资料填写的城市
  35. public string City { get; set; }
  36. //
  37. // 摘要:
  38. // 国家,如中国为CN
  39. public string Country { get; set; }
  40. //
  41. // 摘要:
  42. // 用户头像,最后一个数值代表正方形头像大小(有0、46、64、96、132数值可选,0代表640*640正方形头像),用户没有头像时该项为空
  43. public string HeadimgUrl { get; set; }
  44. [JsonIgnore]
  45. [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
  46. public string UnionId { get; set; }
  47. [JsonConverter(typeof(ChinaDateTimeConverter))]
  48. public DateTime CreateDate { get; set; }
  49. }
  50. }