-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Be sure to change this and the core edition when changing data structures. Then change all the apps that rely on these.
- Loading branch information
Showing
6 changed files
with
259 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.vs/ | ||
**/bin/ | ||
**/obj/ | ||
packages/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.8.34309.116 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TECDataClasses_Framework", "TECDataClasses_Framework\TECDataClasses_Framework.csproj", "{136ECE23-72BD-40F7-AB9C-CF2C973F0B46}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{136ECE23-72BD-40F7-AB9C-CF2C973F0B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{136ECE23-72BD-40F7-AB9C-CF2C973F0B46}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{136ECE23-72BD-40F7-AB9C-CF2C973F0B46}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{136ECE23-72BD-40F7-AB9C-CF2C973F0B46}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {0E7EE1D8-ABC6-44B9-A989-A31C9755263A} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
using System; | ||
|
||
namespace TECDataClasses | ||
{ | ||
public class UserData | ||
{ | ||
public UserData(string username, string discordUsername, string encryptedPassword, string email, UserRole role, bool emailConfirmed, string pronouns, DateTime birthday, int userID) | ||
{ | ||
this.username = username; | ||
this.discordUsername = discordUsername; | ||
this.encryptedPassword = encryptedPassword; | ||
this.email = email; | ||
this.role = role; | ||
this.emailConfirmed = emailConfirmed; | ||
this.pronouns = pronouns; | ||
this.birthday = birthday; | ||
this.userID = userID; | ||
} | ||
|
||
public string username { get; set; } | ||
public string discordUsername { get; set; } | ||
public string encryptedPassword { get; set; } | ||
public string email { get; set; } | ||
public UserRole role { get; set; } | ||
public bool emailConfirmed { get; set; } | ||
public string pronouns { get; set; } | ||
public DateTime birthday { get; set; } | ||
public int userID { get; set; } | ||
} | ||
|
||
public enum UserRole | ||
{ | ||
user, | ||
moderator, | ||
admin, | ||
staff, | ||
owner | ||
} | ||
|
||
public static class UserRoleExtentions | ||
{ | ||
public static UserRole Parse(this string currentString) | ||
{ | ||
switch (currentString) | ||
{ | ||
case "U": | ||
return UserRole.user; | ||
case "M": | ||
return UserRole.moderator; | ||
case "A": | ||
return UserRole.admin; | ||
case "S": | ||
return UserRole.staff; | ||
case "O": | ||
return UserRole.owner; | ||
default: | ||
throw new Exception("Incorrect value for UserRole"); | ||
} | ||
} | ||
} | ||
|
||
public class EventInfo | ||
{ | ||
public EventInfo( | ||
int eventNumber, | ||
string eventName, | ||
string eventDescription, | ||
EventType eventType, | ||
bool questCompatable, | ||
string userPings, | ||
string eventLink, | ||
EventRating eventRating, | ||
DateTime eventDate, | ||
DateTime eventEnd, | ||
string eventLocation) | ||
{ | ||
EventNumber = eventNumber; | ||
EventName = eventName; | ||
EventDescription = eventDescription; | ||
EventType = eventType; | ||
QuestCompatable = questCompatable; | ||
UserPings = userPings; | ||
EventLink = eventLink; | ||
EventRating = eventRating; | ||
EventDate = eventDate; | ||
EventEnd = eventEnd; | ||
EventLocation = eventLocation; | ||
} | ||
|
||
public int EventNumber { get; set; } | ||
public string EventName { get; set; } | ||
public string EventDescription { get; set; } | ||
public EventType EventType { get; set; } | ||
public bool? QuestCompatable { get; set; } | ||
public string UserPings { get; set; } //Json encoded list of pings by discord user ID | ||
public string EventLink { get; set; } | ||
public EventRating EventRating { get; set; } | ||
public DateTime EventDate { get; set; } | ||
public DateTime EventEnd { get; set; } | ||
public string EventLocation { get; set; } | ||
} | ||
|
||
public enum EventType | ||
{ | ||
Game, | ||
Panel, | ||
Special, | ||
GuestPanel, | ||
GuestGame, | ||
Video, | ||
Shop | ||
} | ||
public enum EventRating | ||
{ | ||
Everyone, | ||
PG13, | ||
Adult | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("TECDataClasses_Framework")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("TECDataClasses_Framework")] | ||
[assembly: AssemblyCopyright("Copyright © 2023")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("136ece23-72bd-40f7-ab9c-cf2c973f0b46")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{136ECE23-72BD-40F7-AB9C-CF2C973F0B46}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>TECDataClasses_Framework</RootNamespace> | ||
<AssemblyName>TECDataClasses_Framework</AssemblyName> | ||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Portable.System.DateTimeOnly, Version=8.0.0.3, Culture=neutral, PublicKeyToken=16fb7a27ac3b9689, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Portable.System.DateTimeOnly.8.0.0\lib\net462\Portable.System.DateTimeOnly.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Numerics" /> | ||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Data.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Portable.System.DateTimeOnly" version="8.0.0" targetFramework="net472" /> | ||
<package id="System.Buffers" version="4.5.1" targetFramework="net472" /> | ||
<package id="System.Memory" version="4.5.5" targetFramework="net472" /> | ||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" /> | ||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net472" /> | ||
</packages> |