Lieb-Website/Lieb/Models/GuildWars2/Raid/RaidSignUp.cs
Sarah Faey dc2563e16c added needed rights for slash commands
added functions for account select in the bot
2022-11-29 00:04:22 +01:00

53 lines
1.5 KiB
C#

using System.Text.Json.Serialization;
namespace Lieb.Models.GuildWars2.Raid
{
public enum SignUpType
{
SignedUp = 0,
Maybe = 1,
Backup = 2,
Flex = 3,
SignedOff = 4
}
public class RaidSignUp
{
public int RaidSignUpId { get; set; }
public bool IsExternalUser {get { return LiebUserId == null;}}
public int RaidId { get; set; }
public ulong? LiebUserId { get; set; }
public int? GuildWars2AccountId { get; set; }
public int RaidRoleId { get; set; }
public string ExternalUserName {get; set;} = string.Empty;
public SignUpType SignUpType { get; set; }
[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
public Raid Raid { get; set; }
public LiebUser? LiebUser { get; set; }
public GuildWars2Account? GuildWars2Account { get; set; }
public RaidRole RaidRole { get; set; }
public RaidSignUp(int raidId, ulong userId, int gw2AccountId, int roleId, SignUpType signUpType)
{
RaidId = raidId;
LiebUserId = userId;
GuildWars2AccountId = gw2AccountId;
RaidRoleId = roleId;
SignUpType = signUpType;
}
public RaidSignUp(int raidId, string userName, int roleId, SignUpType signUpType)
{
RaidId = raidId;
RaidRoleId = roleId;
SignUpType = signUpType;
ExternalUserName = userName;
}
private RaidSignUp()
{
}
}
}