fixed deleting users

This commit is contained in:
Sarah Faey 2022-12-03 16:24:06 +01:00
parent 2246624917
commit 300ab2370f
10 changed files with 815 additions and 14 deletions

View file

@ -31,7 +31,7 @@ namespace Lieb.Models.GuildWars2.Raid
public bool MoveFlexUsers { get; set; } = true;
public ulong RaidOwnerId { get; set; }
public ulong? RaidOwnerId { get; set; }
//role name, number of spots
public ICollection<RaidRole> Roles { get; set; } = new HashSet<RaidRole>();

View file

@ -17,7 +17,7 @@ namespace Lieb.Models.GuildWars2.Raid
public LogType Type {get; set;}
public ulong UserId {get; set;}
public ulong? UserId {get; set;}
public int? RaidId { get; set; }
@ -27,7 +27,7 @@ namespace Lieb.Models.GuildWars2.Raid
public DateTimeOffset Time { get; set; } = DateTimeOffset.UtcNow;
public LiebUser User {get; set;}
public LiebUser? User {get; set;}
[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
public Raid? Raid { get; set; }
@ -35,7 +35,7 @@ namespace Lieb.Models.GuildWars2.Raid
[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
public RaidTemplate? RaidTemplate { get; set; }
public static RaidLog CreateRaidLog(ulong userId, Raid raid)
public static RaidLog CreateRaidLog(ulong? userId, Raid raid)
{
return new RaidLog()
{