26 lines
580 B
C#
Raw Normal View History

using Newtonsoft.Json.Linq;
using SqlKata;
namespace PluralKit.Core;
public class AccountPatch: PatchObject
2020-11-20 18:34:08 -05:00
{
public Partial<ulong> DmChannel { get; set; }
public Partial<bool> AllowAutoproxy { get; set; }
2020-11-20 18:34:08 -05:00
public override Query Apply(Query q) => q.ApplyPatch(wrapper => wrapper
.With("dm_channel", DmChannel)
.With("allow_autoproxy", AllowAutoproxy)
);
public JObject ToJson()
{
var o = new JObject();
if (AllowAutoproxy.IsPresent)
o.Add("allow_autoproxy", AllowAutoproxy.Value);
return o;
2021-08-27 11:03:47 -04:00
}
}