Added Models
This commit is contained in:
parent
dbf1be4c5d
commit
245c6da6c6
12 changed files with 246 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
|
|
11
Lieb/Models/Equipped.cs
Normal file
11
Lieb/Models/Equipped.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
namespace Lieb.Models
|
||||
{
|
||||
public class Equipped
|
||||
{
|
||||
public int EquippedId { get; set; }
|
||||
public int GuildWars2AccountId { get; set; }
|
||||
public int RaidRoleId { get; set; }
|
||||
public GuildWars2Account GuildWars2Account { get; set; } = new GuildWars2Account();
|
||||
public RaidRole RaidRole { get; set; } = new RaidRole();
|
||||
}
|
||||
}
|
11
Lieb/Models/GuildWars2Account.cs
Normal file
11
Lieb/Models/GuildWars2Account.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
namespace Lieb.Models
|
||||
{
|
||||
public class GuildWars2Account
|
||||
{
|
||||
public int GuildWars2AccountId { get; set; }
|
||||
public string ApiKey { get; set; } = string.Empty;
|
||||
public string AccountName { get; set; } = string.Empty;
|
||||
public ICollection<Equipped> EquippedRoles { get; set; } = new List<Equipped>();
|
||||
|
||||
}
|
||||
}
|
8
Lieb/Models/Raid/PlannedRaid.cs
Normal file
8
Lieb/Models/Raid/PlannedRaid.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Lieb.Models.Raid
|
||||
{
|
||||
public class PlannedRaid : Raid
|
||||
{
|
||||
//role name, number of spots
|
||||
public ICollection<PlannedRaidRole> Roles { get; set; } = new HashSet<PlannedRaidRole>();
|
||||
}
|
||||
}
|
10
Lieb/Models/Raid/PlannedRaidRole.cs
Normal file
10
Lieb/Models/Raid/PlannedRaidRole.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
namespace Lieb.Models.Raid
|
||||
{
|
||||
public class PlannedRaidRole
|
||||
{
|
||||
public int PlannedRaidRoleId { get; set; }
|
||||
public string Name { get; set; } = String.Empty;
|
||||
public int Spots { get; }
|
||||
public string Description { get; set; } = String.Empty;
|
||||
}
|
||||
}
|
36
Lieb/Models/Raid/Raid.cs
Normal file
36
Lieb/Models/Raid/Raid.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
namespace Lieb.Models.Raid
|
||||
{
|
||||
public abstract class Raid
|
||||
{
|
||||
public int RaidId { get; private set; }
|
||||
|
||||
public string Title { get; set; } = String.Empty;
|
||||
|
||||
public string Description { get; set; } = String.Empty;
|
||||
|
||||
public DateTimeOffset StartTime { get; set; }
|
||||
|
||||
public double RaidDuration { get; set; }
|
||||
|
||||
public string Organisator { get; set; } = String.Empty;
|
||||
|
||||
public string Guild { get; set; } = String.Empty;
|
||||
|
||||
public string VoiceChat { get; set; } = String.Empty;
|
||||
|
||||
public int Frequency { get; set; }
|
||||
|
||||
public ICollection<RaidReminder> Reminders { get; set; } = new List<RaidReminder>();
|
||||
|
||||
public ICollection<RaidSignUp> SignUps { get; set; } = new HashSet<RaidSignUp>();
|
||||
|
||||
public ICollection<SignUpHistory> SignUpHistory { get; set; } = new HashSet<SignUpHistory>();
|
||||
|
||||
//used to edit the Discord message
|
||||
public ulong DiscordMessageId { get; set; }
|
||||
|
||||
public ulong DiscordChannelId { get; set; }
|
||||
|
||||
public ulong DiscordGuildId { get; set; }
|
||||
}
|
||||
}
|
31
Lieb/Models/Raid/RaidReminder.cs
Normal file
31
Lieb/Models/Raid/RaidReminder.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
namespace Lieb.Models.Raid
|
||||
{
|
||||
public class RaidReminder
|
||||
{
|
||||
public enum ReminderType
|
||||
{
|
||||
User = 0,
|
||||
Channel = 1
|
||||
}
|
||||
|
||||
public RaidReminder(ReminderType type, string message, double hoursBeforeRaid, ulong channelId = 0)
|
||||
{
|
||||
Type = type;
|
||||
Message = message;
|
||||
HoursBeforeRaid = hoursBeforeRaid;
|
||||
ChannelId = channelId;
|
||||
}
|
||||
|
||||
public int RaidReminderId { get; set; }
|
||||
|
||||
public ReminderType Type { get; set; }
|
||||
|
||||
public string Message { get; set; }
|
||||
|
||||
public double HoursBeforeRaid { get; set; }
|
||||
|
||||
public ulong ChannelId { get; set; }
|
||||
|
||||
public bool Sent { get; set; } = false;
|
||||
}
|
||||
}
|
28
Lieb/Models/Raid/RaidSignUp.cs
Normal file
28
Lieb/Models/Raid/RaidSignUp.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
namespace Lieb.Models.Raid
|
||||
{
|
||||
public enum SignUpType
|
||||
{
|
||||
SignedUp = 0,
|
||||
Maybe = 1,
|
||||
Backup = 2,
|
||||
Flex = 3,
|
||||
SignedOff = 4
|
||||
}
|
||||
|
||||
public class RaidSignUp
|
||||
{
|
||||
public int RaidSignUpId { get; set; }
|
||||
|
||||
public int RaidId { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public int GuildWars2AccountId { get; set; }
|
||||
public int PlannedRaidRoleId { get; set; }
|
||||
|
||||
public SignUpType SignUpType { get; set; }
|
||||
|
||||
public Raid Raid { get; set; }
|
||||
public User User { get; set; } = new User();
|
||||
public GuildWars2Account GuildWars2Account { get; set; } = new GuildWars2Account();
|
||||
public PlannedRaidRole PlannedRaidRole { get; set; } = new PlannedRaidRole();
|
||||
}
|
||||
}
|
7
Lieb/Models/Raid/RandomRaid.cs
Normal file
7
Lieb/Models/Raid/RandomRaid.cs
Normal file
|
@ -0,0 +1,7 @@
|
|||
namespace Lieb.Models.Raid
|
||||
{
|
||||
public class RandomRaid : Raid
|
||||
{
|
||||
public ICollection<Role> WantedRoles { get; set; } = new HashSet<Role>();
|
||||
}
|
||||
}
|
15
Lieb/Models/Raid/SignUpHistory.cs
Normal file
15
Lieb/Models/Raid/SignUpHistory.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
namespace Lieb.Models.Raid
|
||||
{
|
||||
public class SignUpHistory
|
||||
{
|
||||
public int SignUpHistoryId { get; set; }
|
||||
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
|
||||
public DateTimeOffset Time { get; set; } = DateTimeOffset.Now;
|
||||
|
||||
public SignUpType SignUpType { get; set; }
|
||||
|
||||
public Raid Raid { get; set; }
|
||||
}
|
||||
}
|
77
Lieb/Models/RaidRole.cs
Normal file
77
Lieb/Models/RaidRole.cs
Normal file
|
@ -0,0 +1,77 @@
|
|||
namespace Lieb.Models
|
||||
{
|
||||
public enum Role
|
||||
{
|
||||
Might = 0,
|
||||
Quickness = 1,
|
||||
Alacrity = 2,
|
||||
Heal = 3,
|
||||
Tank = 4,
|
||||
pDps = 5,
|
||||
cDps = 6,
|
||||
}
|
||||
|
||||
public enum GuildWars2Class
|
||||
{
|
||||
Elementalist = 1,
|
||||
Engineer = 2,
|
||||
Thief = 3,
|
||||
Ranger = 4,
|
||||
Necromancer = 5,
|
||||
Masmer = 6,
|
||||
Revenant = 7,
|
||||
Guard = 8,
|
||||
Warrior = 9,
|
||||
}
|
||||
|
||||
public enum EliteSpecialization
|
||||
{
|
||||
Elemantalist = 1,
|
||||
Tempest = 2,
|
||||
Weaver = 3,
|
||||
Catalyst = 4,
|
||||
Engineer = 5,
|
||||
Scrapper = 6,
|
||||
Holosmith = 7,
|
||||
Mechanist = 8,
|
||||
Thief = 9,
|
||||
DareDevil = 10,
|
||||
Deadeye = 11,
|
||||
Spectre = 12,
|
||||
Ranger = 13,
|
||||
Druid = 14,
|
||||
Soulbeast = 15,
|
||||
Untamed = 16,
|
||||
Necromancer = 17,
|
||||
Reaper = 18,
|
||||
Scourge = 19,
|
||||
Harbinger = 20,
|
||||
Mesmer = 21,
|
||||
Chronomancer = 22,
|
||||
Mirage = 23,
|
||||
Virtuoso = 24,
|
||||
Revenant = 25,
|
||||
Herald = 26,
|
||||
Renegade = 27,
|
||||
Vindicator = 28,
|
||||
Guard = 29,
|
||||
Dragonhunter = 30,
|
||||
Firebrand = 31,
|
||||
Willbender = 32,
|
||||
Warrior = 33,
|
||||
Berserker = 34,
|
||||
Spellbreaker = 35,
|
||||
Bladesworn = 36,
|
||||
}
|
||||
|
||||
public class RaidRole
|
||||
{
|
||||
public int RaidRoleId { get; set; }
|
||||
public string RoleName { get; set; } = String.Empty;
|
||||
public ICollection<Role> Boons { get; set; } = new List<Role>();
|
||||
public GuildWars2Class Class { get; set; }
|
||||
public EliteSpecialization EliteSpecialization { get; set; }
|
||||
public ICollection<Equipped> EquippedRoles { get; set; } = new List<Equipped>();
|
||||
|
||||
}
|
||||
}
|
11
Lieb/Models/User.cs
Normal file
11
Lieb/Models/User.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
namespace Lieb.Models
|
||||
{
|
||||
public class User
|
||||
{
|
||||
public int UserId { get; set; }
|
||||
public ulong DiscordUserId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public DateTime Birthday { get; set; }
|
||||
public ICollection<GuildWars2Account> GuildWars2Accounts { get; set; } = new List<GuildWars2Account>();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue