move shared content to shared project

This commit is contained in:
rootdarkarchon
2022-08-22 11:21:28 +02:00
parent 927e1aaceb
commit 6c243d0247
40 changed files with 117 additions and 97 deletions

View File

@@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
namespace MareSynchronosShared.Models
{
public class Auth
{
[Key]
[MaxLength(64)]
public string HashedKey { get; set; }
public string UserUID { get; set; }
public User User { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
namespace MareSynchronosShared.Models
{
public class Banned
{
[Key]
[MaxLength(100)]
public string CharacterIdentification { get; set; }
public string Reason { get; set; }
[Timestamp]
public byte[] Timestamp { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
using System.ComponentModel.DataAnnotations;
namespace MareSynchronosShared.Models
{
public class BannedRegistrations
{
[Key]
[MaxLength(100)]
public string DiscordIdOrLodestoneAuth { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
namespace MareSynchronosShared.Models
{
public class ClientPair
{
[MaxLength(10)]
public string UserUID { get; set; }
public User User { get; set; }
[MaxLength(10)]
public string OtherUserUID { get; set; }
public User OtherUser { get; set; }
public bool IsPaused { get; set; }
public bool AllowReceivingMessages { get; set; } = false;
[Timestamp]
public byte[] Timestamp { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
namespace MareSynchronosShared.Models
{
public class FileCache
{
[Key]
[MaxLength(40)]
public string Hash { get; set; }
[MaxLength(10)]
public string UploaderUID { get; set; }
public User Uploader { get; set; }
public bool Uploaded { get; set; }
[Timestamp]
public byte[] Timestamp { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
namespace MareSynchronosShared.Models
{
public class ForbiddenUploadEntry
{
[Key]
[MaxLength(40)]
public string Hash { get; set; }
[MaxLength(100)]
public string ForbiddenBy { get; set; }
[Timestamp]
public byte[] Timestamp { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
namespace MareSynchronosShared.Models
{
public class LodeStoneAuth
{
[Key]
public ulong DiscordId { get; set; }
[MaxLength(100)]
public string HashedLodestoneId { get; set; }
[MaxLength(100)]
public string? LodestoneAuthString { get; set; }
public User? User { get; set; }
public DateTime? StartedAt { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
namespace MareSynchronosShared.Models
{
public class User
{
[Key]
[MaxLength(10)]
public string UID { get; set; }
[MaxLength(100)]
public string CharacterIdentification { get; set; }
[Timestamp]
public byte[] Timestamp { get; set; }
public bool IsModerator { get; set; } = false;
public bool IsAdmin { get; set; } = false;
public DateTime LastLoggedIn { get; set; }
}
}