Added Polls and locking raids if not enough users are signed up

needs testing
This commit is contained in:
t.ruspekhofer 2023-01-03 13:53:26 +01:00
parent 32af72a262
commit ccb276a265
14 changed files with 289 additions and 8 deletions

View file

@ -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);
}
}

View file

@ -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)
{

View file

@ -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; }