mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 17:07:22 +01:00
move shared content to shared project
This commit is contained in:
parent
927e1aaceb
commit
6c243d0247
40 changed files with 117 additions and 97 deletions
14
MareSynchronosServer/MareSynchronosShared/Models/Auth.cs
Normal file
14
MareSynchronosServer/MareSynchronosShared/Models/Auth.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
14
MareSynchronosServer/MareSynchronosShared/Models/Banned.cs
Normal file
14
MareSynchronosServer/MareSynchronosShared/Models/Banned.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models
|
||||
{
|
||||
public class BannedRegistrations
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(100)]
|
||||
public string DiscordIdOrLodestoneAuth { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
21
MareSynchronosServer/MareSynchronosShared/Models/User.cs
Normal file
21
MareSynchronosServer/MareSynchronosShared/Models/User.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue