feat(apiv2): database changes

This commit is contained in:
spiral
2021-09-26 23:18:17 -04:00
parent fb4aaad19f
commit dbe040f852
10 changed files with 54 additions and 7 deletions

View File

@@ -1,3 +1,5 @@
using System;
using NodaTime;
using Newtonsoft.Json.Linq;
@@ -33,6 +35,7 @@ namespace PluralKit.Core
{
public GroupId Id { get; private set; }
public string Hid { get; private set; } = null!;
public Guid Uuid { get; private set; }
public SystemId System { get; private set; }
public string Name { get; private set; } = null!;

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
@@ -39,6 +40,7 @@ namespace PluralKit.Core
// when trying to map to *subclasses* (eg. ListedMember). Adding private setters makes it work anyway.
public MemberId Id { get; private set; }
public string Hid { get; private set; }
public Guid Uuid { get; private set; }
public SystemId System { get; private set; }
public string Color { get; private set; }
public string AvatarUrl { get; private set; }

View File

@@ -1,7 +1,7 @@
using System;
using NodaTime;
namespace PluralKit.Core
{
@@ -32,6 +32,7 @@ namespace PluralKit.Core
public class PKSwitch
{
public SwitchId Id { get; }
public Guid Uuid { get; private set; }
public SystemId System { get; set; }
public Instant Timestamp { get; }
}

View File

@@ -1,3 +1,5 @@
using System;
using Dapper.Contrib.Extensions;
using Newtonsoft.Json;
@@ -36,6 +38,7 @@ namespace PluralKit.Core
{
[Key] public SystemId Id { get; }
public string Hid { get; }
public Guid Uuid { get; private set; }
public string Name { get; }
public string Description { get; }
public string Tag { get; }