Migrate guild objects to the patch system

This commit is contained in:
Ske
2020-06-29 15:20:28 +02:00
parent 467ce78522
commit 0598c53f62
11 changed files with 124 additions and 62 deletions

View File

@@ -0,0 +1,15 @@
#nullable enable
namespace PluralKit.Core
{
public class SystemGuildPatch: PatchObject
{
public Partial<bool> ProxyEnabled { get; set; }
public Partial<AutoproxyMode> AutoproxyMode { get; set; }
public Partial<MemberId?> AutoproxyMember { get; set; }
public override UpdateQueryBuilder Apply(UpdateQueryBuilder b) => b
.With("proxy_enabled", ProxyEnabled)
.With("autoproxy_mode", AutoproxyMode)
.With("autoproxy_member", AutoproxyMember);
}
}