Added Polls and locking raids if not enough users are signed up
needs testing
This commit is contained in:
parent
32af72a262
commit
ccb276a265
14 changed files with 289 additions and 8 deletions
|
@ -14,6 +14,10 @@ namespace Lieb.Models.GuildWars2.Raid
|
|||
|
||||
public DateTimeOffset FreeForAllTimeUTC { get; set; }
|
||||
|
||||
public DateTimeOffset MinUserDeadLineUTC { get; set; }
|
||||
|
||||
public int? MinUserPollId { get; set; }
|
||||
|
||||
public ICollection<RaidSignUp> SignUps { get; set; } = new HashSet<RaidSignUp>();
|
||||
|
||||
public Raid() { }
|
||||
|
@ -24,6 +28,7 @@ namespace Lieb.Models.GuildWars2.Raid
|
|||
StartTimeUTC = TimeZoneInfo.ConvertTimeToUtc(template.StartTime, timeZone);
|
||||
EndTimeUTC = TimeZoneInfo.ConvertTimeToUtc(template.EndTime, timeZone);
|
||||
FreeForAllTimeUTC = TimeZoneInfo.ConvertTimeToUtc(template.FreeForAllTime, timeZone);
|
||||
MinUserDeadLineUTC = TimeZoneInfo.ConvertTimeToUtc(template.MinUserDeadLine, timeZone);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -52,7 +52,8 @@ namespace Lieb.Models.GuildWars2.Raid
|
|||
|
||||
public ulong? RaidOwnerId { get; set; }
|
||||
|
||||
//role name, number of spots
|
||||
public int MinUsers { get; set; } = 0;
|
||||
|
||||
public ICollection<RaidRole> Roles { get; set; } = new HashSet<RaidRole>();
|
||||
|
||||
public ICollection<RaidReminder> Reminders { get; set; } = new List<RaidReminder>();
|
||||
|
@ -73,6 +74,7 @@ namespace Lieb.Models.GuildWars2.Raid
|
|||
this.MoveFlexUsers = template.MoveFlexUsers;
|
||||
this.RaidOwnerId = template.RaidOwnerId;
|
||||
this.EventType = template.EventType;
|
||||
this.MinUsers = template.MinUsers;
|
||||
|
||||
foreach (RaidRole role in template.Roles)
|
||||
{
|
||||
|
|
|
@ -14,6 +14,8 @@ namespace Lieb.Models.GuildWars2.Raid
|
|||
|
||||
public DateTime FreeForAllTime { get; set; }
|
||||
|
||||
public DateTime MinUserDeadLine { get; set; }
|
||||
|
||||
public string TimeZone { get; set; } = String.Empty;
|
||||
|
||||
public int Interval { get; set; }
|
||||
|
|
12
Lieb/Models/Poll/Poll.cs
Normal file
12
Lieb/Models/Poll/Poll.cs
Normal file
|
@ -0,0 +1,12 @@
|
|||
namespace Lieb.Models.Poll
|
||||
{
|
||||
public class Poll
|
||||
{
|
||||
public int PollId { get; set; }
|
||||
public string Question { get; set; }
|
||||
public ICollection<PollOption> Options { get; set; } = new List<PollOption>();
|
||||
public ICollection<PollAnswer> Answers { get; set; } = new List<PollAnswer>();
|
||||
public int? RaidId { get; set; }
|
||||
|
||||
}
|
||||
}
|
11
Lieb/Models/Poll/PollAnswer.cs
Normal file
11
Lieb/Models/Poll/PollAnswer.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
namespace Lieb.Models.Poll
|
||||
{
|
||||
public class PollAnswer
|
||||
{
|
||||
public int PollAnswerId { get; set; }
|
||||
|
||||
public int? PollOptionId { get; set; }
|
||||
|
||||
public ulong UserId { get; set; }
|
||||
}
|
||||
}
|
8
Lieb/Models/Poll/PollOption.cs
Normal file
8
Lieb/Models/Poll/PollOption.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Lieb.Models.Poll
|
||||
{
|
||||
public class PollOption
|
||||
{
|
||||
public int PollOptionId { get; set; }
|
||||
public string Name { get; set;}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue