Remove JSON attributes from models

This commit is contained in:
Ske 2020-06-13 13:06:41 +02:00
parent 292676b694
commit e8b69dfe29
2 changed files with 24 additions and 25 deletions

View File

@ -8,21 +8,20 @@ using NodaTime.Text;
namespace PluralKit.Core { namespace PluralKit.Core {
public class PKMember public class PKMember
{ {
// Additions here should be mirrored in MemberStore::Save public int Id { get; set; }
[JsonIgnore] public int Id { get; set; } public string Hid { get; set; }
[JsonProperty("id")] public string Hid { get; set; } public int System { get; set; }
[JsonIgnore] public int System { get; set; } public string Color { get; set; }
[JsonProperty("color")] public string Color { get; set; } public string AvatarUrl { get; set; }
[JsonProperty("avatar_url")] public string AvatarUrl { get; set; } public string Name { get; set; }
[JsonProperty("name")] public string Name { get; set; } public string DisplayName { get; set; }
[JsonProperty("display_name")] public string DisplayName { get; set; } public LocalDate? Birthday { get; set; }
[JsonProperty("birthday")] public LocalDate? Birthday { get; set; } public string Pronouns { get; set; }
[JsonProperty("pronouns")] public string Pronouns { get; set; } public string Description { get; set; }
[JsonProperty("description")] public string Description { get; set; } public ICollection<ProxyTag> ProxyTags { get; set; }
[JsonProperty("proxy_tags")] public ICollection<ProxyTag> ProxyTags { get; set; } public bool KeepProxy { get; set; }
[JsonProperty("keep_proxy")] public bool KeepProxy { get; set; } public Instant Created { get; set; }
[JsonProperty("created")] public Instant Created { get; set; } public int MessageCount { get; set; }
[JsonProperty("message_count")] public int MessageCount { get; set; }
public PrivacyLevel MemberPrivacy { get; set; } public PrivacyLevel MemberPrivacy { get; set; }

View File

@ -8,16 +8,16 @@ namespace PluralKit.Core {
public class PKSystem public class PKSystem
{ {
// Additions here should be mirrored in SystemStore::Save // Additions here should be mirrored in SystemStore::Save
[Key] [JsonIgnore] public int Id { get; set; } [Key] public int Id { get; set; }
[JsonProperty("id")] public string Hid { get; set; } public string Hid { get; set; }
[JsonProperty("name")] public string Name { get; set; } public string Name { get; set; }
[JsonProperty("description")] public string Description { get; set; } public string Description { get; set; }
[JsonProperty("tag")] public string Tag { get; set; } public string Tag { get; set; }
[JsonProperty("avatar_url")] public string AvatarUrl { get; set; } public string AvatarUrl { get; set; }
[JsonIgnore] public string Token { get; set; } public string Token { get; set; }
[JsonProperty("created")] public Instant Created { get; set; } public Instant Created { get; set; }
[JsonProperty("tz")] public string UiTz { get; set; } public string UiTz { get; set; }
[JsonProperty("ping")] public bool PingsEnabled { get; set; } public bool PingsEnabled { get; set; }
public PrivacyLevel DescriptionPrivacy { get; set; } public PrivacyLevel DescriptionPrivacy { get; set; }
public PrivacyLevel MemberListPrivacy { get; set; } public PrivacyLevel MemberListPrivacy { get; set; }
public PrivacyLevel FrontPrivacy { get; set; } public PrivacyLevel FrontPrivacy { get; set; }