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 {
public class PKMember
{
// Additions here should be mirrored in MemberStore::Save
[JsonIgnore] public int Id { get; set; }
[JsonProperty("id")] public string Hid { get; set; }
[JsonIgnore] public int System { get; set; }
[JsonProperty("color")] public string Color { get; set; }
[JsonProperty("avatar_url")] public string AvatarUrl { get; set; }
[JsonProperty("name")] public string Name { get; set; }
[JsonProperty("display_name")] public string DisplayName { get; set; }
[JsonProperty("birthday")] public LocalDate? Birthday { get; set; }
[JsonProperty("pronouns")] public string Pronouns { get; set; }
[JsonProperty("description")] public string Description { get; set; }
[JsonProperty("proxy_tags")] public ICollection<ProxyTag> ProxyTags { get; set; }
[JsonProperty("keep_proxy")] public bool KeepProxy { get; set; }
[JsonProperty("created")] public Instant Created { get; set; }
[JsonProperty("message_count")] public int MessageCount { get; set; }
public int Id { get; set; }
public string Hid { get; set; }
public int System { get; set; }
public string Color { get; set; }
public string AvatarUrl { get; set; }
public string Name { get; set; }
public string DisplayName { get; set; }
public LocalDate? Birthday { get; set; }
public string Pronouns { get; set; }
public string Description { get; set; }
public ICollection<ProxyTag> ProxyTags { get; set; }
public bool KeepProxy { get; set; }
public Instant Created { get; set; }
public int MessageCount { get; set; }
public PrivacyLevel MemberPrivacy { get; set; }

View File

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