Syncshells (#11)
* some groups stuff * further groups rework * fixes for pause changes * adjsut timeout interval * fixes and namespace change to file scoped * more fixes * further implement groups * fix change group ownership * add some more stuff for groups * more fixes and additions * some fixes based on analyzers, add shard info to ui * add discord command, cleanup * fix regex * add group migration and deletion on user deletion * add api method for client to check health of connection * adjust regex for vanity * fixes for server and bot * fixes some string comparison in linq queries * fixes group leave and sets alias to null * fix syntax in changeownership * add better logging, fixes for group leaving * fixes for group leave Co-authored-by: Stanley Dimant <root.darkarchon@outlook.com>
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models
|
||||
{
|
||||
public class Auth
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(64)]
|
||||
public string HashedKey { get; set; }
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public string UserUID { get; set; }
|
||||
public User User { get; set; }
|
||||
}
|
||||
public class Auth
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(64)]
|
||||
public string HashedKey { get; set; }
|
||||
|
||||
public string UserUID { get; set; }
|
||||
public User User { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class Banned
|
||||
{
|
||||
public class Banned
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(100)]
|
||||
public string CharacterIdentification { get; set; }
|
||||
public string Reason { get; set; }
|
||||
[Timestamp]
|
||||
public byte[] Timestamp { get; set; }
|
||||
}
|
||||
[Key]
|
||||
[MaxLength(100)]
|
||||
public string CharacterIdentification { get; set; }
|
||||
public string Reason { get; set; }
|
||||
[Timestamp]
|
||||
public byte[] Timestamp { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class BannedRegistrations
|
||||
{
|
||||
public class BannedRegistrations
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(100)]
|
||||
public string DiscordIdOrLodestoneAuth { get; set; }
|
||||
}
|
||||
[Key]
|
||||
[MaxLength(100)]
|
||||
public string DiscordIdOrLodestoneAuth { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class ClientPair
|
||||
{
|
||||
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; }
|
||||
}
|
||||
[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; }
|
||||
}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class FileCache
|
||||
{
|
||||
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; }
|
||||
}
|
||||
[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; }
|
||||
}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class ForbiddenUploadEntry
|
||||
{
|
||||
public class ForbiddenUploadEntry
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(40)]
|
||||
public string Hash { get; set; }
|
||||
[MaxLength(100)]
|
||||
public string ForbiddenBy { get; set; }
|
||||
[Timestamp]
|
||||
public byte[] Timestamp { get; set; }
|
||||
}
|
||||
[Key]
|
||||
[MaxLength(40)]
|
||||
public string Hash { get; set; }
|
||||
[MaxLength(100)]
|
||||
public string ForbiddenBy { get; set; }
|
||||
[Timestamp]
|
||||
public byte[] Timestamp { get; set; }
|
||||
}
|
||||
|
||||
16
MareSynchronosServer/MareSynchronosShared/Models/Group.cs
Normal file
16
MareSynchronosServer/MareSynchronosShared/Models/Group.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class Group
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(20)]
|
||||
public string GID { get; set; }
|
||||
public string OwnerUID { get; set; }
|
||||
public User Owner { get; set; }
|
||||
[MaxLength(50)]
|
||||
public string Alias { get; set; }
|
||||
public bool InvitesEnabled { get; set; }
|
||||
public string HashedPassword { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class GroupPair
|
||||
{
|
||||
public string GroupGID { get; set; }
|
||||
public Group Group { get; set; }
|
||||
public string GroupUserUID { get; set; }
|
||||
public User GroupUser { get; set; }
|
||||
public bool IsPaused { get; set; }
|
||||
public bool IsPinned { get; set; }
|
||||
}
|
||||
@@ -1,16 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class LodeStoneAuth
|
||||
{
|
||||
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; }
|
||||
}
|
||||
[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; }
|
||||
}
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class User
|
||||
{
|
||||
public class User
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(10)]
|
||||
public string UID { get; set; }
|
||||
//[MaxLength(100)]
|
||||
//public string CharacterIdentification { get; set; }
|
||||
[Timestamp]
|
||||
public byte[] Timestamp { get; set; }
|
||||
[Key]
|
||||
[MaxLength(10)]
|
||||
public string UID { get; set; }
|
||||
[Timestamp]
|
||||
public byte[] Timestamp { get; set; }
|
||||
|
||||
public bool IsModerator { get; set; } = false;
|
||||
public bool IsModerator { get; set; } = false;
|
||||
|
||||
public bool IsAdmin { get; set; } = false;
|
||||
public bool IsAdmin { get; set; } = false;
|
||||
|
||||
public DateTime LastLoggedIn { get; set; }
|
||||
[MaxLength(10)]
|
||||
public string Alias { get; set; }
|
||||
}
|
||||
public DateTime LastLoggedIn { get; set; }
|
||||
[MaxLength(10)]
|
||||
public string Alias { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user