mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
- Fixed some possible nullref exceptions - Methods signatures now have up to 3 parameters before breakaing down each parameter in a separate line - Method invocations have the same rule, except the first parameter will be in the same line as the invocation to prevent some ugliness when passing lambas as arguments - Applied many more codestyles - Extensions folder fully reformatted
45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using NadekoBot.Services.Database.Models;
|
|
|
|
namespace NadekoBot.Db.Models;
|
|
|
|
public class ClubInfo : DbEntity
|
|
{
|
|
[MaxLength(20)]
|
|
public string Name { get; set; }
|
|
public int Discrim { get; set; }
|
|
|
|
public string ImageUrl { get; set; } = string.Empty;
|
|
public int MinimumLevelReq { get; set; } = 5;
|
|
public int Xp { get; set; } = 0;
|
|
|
|
public int OwnerId { get; set; }
|
|
public DiscordUser Owner { get; set; }
|
|
|
|
public List<DiscordUser> Users { get; set; } = new();
|
|
|
|
public List<ClubApplicants> Applicants { get; set; } = new();
|
|
public List<ClubBans> Bans { get; set; } = new();
|
|
public string Description { get; set; }
|
|
|
|
public override string ToString()
|
|
=> Name + "#" + Discrim;
|
|
}
|
|
|
|
public class ClubApplicants
|
|
{
|
|
public int ClubId { get; set; }
|
|
public ClubInfo Club { get; set; }
|
|
|
|
public int UserId { get; set; }
|
|
public DiscordUser User { get; set; }
|
|
}
|
|
|
|
public class ClubBans
|
|
{
|
|
public int ClubId { get; set; }
|
|
public ClubInfo Club { get; set; }
|
|
|
|
public int UserId { get; set; }
|
|
public DiscordUser User { get; set; }
|
|
} |