mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 22:07:55 +00:00
Move system updates to the same patch system as members
This commit is contained in:
parent
c5697b33e2
commit
9c1efc7886
12 changed files with 172 additions and 111 deletions
31
PluralKit.Core/Models/Patch/SystemPatch.cs
Normal file
31
PluralKit.Core/Models/Patch/SystemPatch.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#nullable enable
|
||||
namespace PluralKit.Core
|
||||
{
|
||||
public class SystemPatch: PatchObject
|
||||
{
|
||||
public Partial<string?> Name { get; set; }
|
||||
public Partial<string?> Description { get; set; }
|
||||
public Partial<string?> Tag { get; set; }
|
||||
public Partial<string?> AvatarUrl { get; set; }
|
||||
public Partial<string?> Token { get; set; }
|
||||
public Partial<string> UiTz { get; set; }
|
||||
public Partial<PrivacyLevel> DescriptionPrivacy { get; set; }
|
||||
public Partial<PrivacyLevel> MemberListPrivacy { get; set; }
|
||||
public Partial<PrivacyLevel> FrontPrivacy { get; set; }
|
||||
public Partial<PrivacyLevel> FrontHistoryPrivacy { get; set; }
|
||||
public Partial<bool> PingsEnabled { get; set; }
|
||||
|
||||
public override UpdateQueryBuilder Apply(UpdateQueryBuilder b) => b
|
||||
.With("name", Name)
|
||||
.With("description", Description)
|
||||
.With("tag", Tag)
|
||||
.With("avatar_url", AvatarUrl)
|
||||
.With("token", Token)
|
||||
.With("ui_tz", UiTz)
|
||||
.With("description_privacy", DescriptionPrivacy)
|
||||
.With("member_list_privacy", MemberListPrivacy)
|
||||
.With("front_privacy", FrontPrivacy)
|
||||
.With("front_history_privacy", FrontHistoryPrivacy)
|
||||
.With("pings_enabled", PingsEnabled);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue