Initial
This commit is contained in:
16
MareSynchronosServer/MareSynchronosShared/Models/Auth.cs
Normal file
16
MareSynchronosServer/MareSynchronosShared/Models/Auth.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
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; }
|
||||
public bool IsBanned { get; set; }
|
||||
public string? PrimaryUserUID { get; set; }
|
||||
public User? PrimaryUser { get; set; }
|
||||
}
|
13
MareSynchronosServer/MareSynchronosShared/Models/Banned.cs
Normal file
13
MareSynchronosServer/MareSynchronosShared/Models/Banned.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
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,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class BannedRegistrations
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(100)]
|
||||
public string DiscordIdOrLodestoneAuth { get; set; }
|
||||
}
|
@@ -0,0 +1,91 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public enum CharaDataAccess
|
||||
{
|
||||
Individuals,
|
||||
ClosePairs,
|
||||
AllPairs,
|
||||
Public
|
||||
}
|
||||
|
||||
public enum CharaDataShare
|
||||
{
|
||||
Private,
|
||||
Shared
|
||||
}
|
||||
|
||||
public class CharaData
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public virtual User Uploader { get; set; }
|
||||
public string UploaderUID { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public DateTime UpdatedDate { get; set; }
|
||||
public string Description { get; set; }
|
||||
public CharaDataAccess AccessType { get; set; }
|
||||
public CharaDataShare ShareType { get; set; }
|
||||
public DateTime? ExpiryDate { get; set; }
|
||||
public string? GlamourerData { get; set; }
|
||||
public string? CustomizeData { get; set; }
|
||||
public string? ManipulationData { get; set; }
|
||||
public int DownloadCount { get; set; } = 0;
|
||||
public virtual ICollection<CharaDataPose> Poses { get; set; } = [];
|
||||
public virtual ICollection<CharaDataFile> Files { get; set; } = [];
|
||||
public virtual ICollection<CharaDataFileSwap> FileSwaps { get; set; } = [];
|
||||
public virtual ICollection<CharaDataOriginalFile> OriginalFiles { get; set; } = [];
|
||||
public virtual ICollection<CharaDataAllowance> AllowedIndividiuals { get; set; } = [];
|
||||
}
|
||||
|
||||
public class CharaDataAllowance
|
||||
{
|
||||
[Key]
|
||||
public long Id { get; set; }
|
||||
public virtual CharaData Parent { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
public string ParentUploaderUID { get; set; }
|
||||
public virtual User? AllowedUser { get; set; }
|
||||
public string? AllowedUserUID { get; set; }
|
||||
public virtual Group? AllowedGroup { get; set; }
|
||||
public string? AllowedGroupGID { get; set; }
|
||||
}
|
||||
|
||||
public class CharaDataOriginalFile
|
||||
{
|
||||
public virtual CharaData Parent { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
public string ParentUploaderUID { get; set; }
|
||||
public string GamePath { get; set; }
|
||||
public string Hash { get; set; }
|
||||
}
|
||||
|
||||
public class CharaDataFile
|
||||
{
|
||||
public virtual FileCache FileCache { get; set; }
|
||||
public string FileCacheHash { get; set; }
|
||||
public string GamePath { get; set; }
|
||||
public virtual CharaData Parent { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
public string ParentUploaderUID { get; set; }
|
||||
}
|
||||
|
||||
public class CharaDataFileSwap
|
||||
{
|
||||
public virtual CharaData Parent { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
public string ParentUploaderUID { get; set; }
|
||||
public string GamePath { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
}
|
||||
|
||||
public class CharaDataPose
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public virtual CharaData Parent { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
public string ParentUploaderUID { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string PoseData { get; set; }
|
||||
public string WorldData { get; set; }
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
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; }
|
||||
public bool DisableSounds { get; set; } = false;
|
||||
public bool DisableAnimations { get; set; } = false;
|
||||
public bool DisableVFX { get; set; } = false;
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
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; }
|
||||
public DateTime UploadDate { get; set; }
|
||||
[Timestamp]
|
||||
public byte[] Timestamp { get; set; }
|
||||
public long Size { get; set; }
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
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; }
|
||||
}
|
19
MareSynchronosServer/MareSynchronosShared/Models/Group.cs
Normal file
19
MareSynchronosServer/MareSynchronosShared/Models/Group.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
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; }
|
||||
public bool DisableSounds { get; set; }
|
||||
public bool DisableAnimations { get; set; }
|
||||
public bool DisableVFX { get; set; }
|
||||
}
|
13
MareSynchronosServer/MareSynchronosShared/Models/GroupBan.cs
Normal file
13
MareSynchronosServer/MareSynchronosShared/Models/GroupBan.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class GroupBan
|
||||
{
|
||||
public Group Group { get; set; }
|
||||
public string GroupGID { get; set; }
|
||||
public User BannedUser { get; set; }
|
||||
public string BannedUserUID { get; set; }
|
||||
public User BannedBy { get; set; }
|
||||
public string BannedByUID { get; set; }
|
||||
public DateTime BannedOn { get; set; }
|
||||
public string BannedReason { get; set; }
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
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; }
|
||||
public bool IsModerator { get; set; }
|
||||
public bool DisableSounds { get; set; }
|
||||
public bool DisableAnimations { get; set; }
|
||||
public bool DisableVFX { get; set; }
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class GroupTempInvite
|
||||
{
|
||||
public Group Group { get; set; }
|
||||
public string GroupGID { get; set; }
|
||||
[MaxLength(64)]
|
||||
public string Invite { get; set; }
|
||||
public DateTime ExpirationDate { get; set; }
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
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; }
|
||||
}
|
20
MareSynchronosServer/MareSynchronosShared/Models/User.cs
Normal file
20
MareSynchronosServer/MareSynchronosShared/Models/User.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class User
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(10)]
|
||||
public string UID { 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; }
|
||||
[MaxLength(15)]
|
||||
public string Alias { get; set; }
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class UserProfileData
|
||||
{
|
||||
public string Base64ProfileImage { get; set; }
|
||||
public bool FlaggedForReport { get; set; }
|
||||
public bool IsNSFW { get; set; }
|
||||
public bool ProfileDisabled { get; set; }
|
||||
public User User { get; set; }
|
||||
|
||||
public string UserDescription { get; set; }
|
||||
|
||||
[Required]
|
||||
[Key]
|
||||
[ForeignKey(nameof(User))]
|
||||
public string UserUID { get; set; }
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public class UserProfileDataReport
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public DateTime ReportDate { get; set; }
|
||||
public User ReportedUser { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ReportedUser))]
|
||||
public string ReportedUserUID { get; set; }
|
||||
|
||||
public User ReportingUser { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ReportingUser))]
|
||||
public string ReportingUserUID { get; set; }
|
||||
|
||||
public string ReportReason { get; set; }
|
||||
}
|
Reference in New Issue
Block a user