This repository has been archived on 2024-12-22. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
elliebot/src/EllieBot/Db/Models/club/ClubInfo.cs
Toastie 29c0b4acfc
Updated Db models
I hate working on database stuff
2024-06-14 00:20:21 +12:00

41 lines
No EOL
1,017 B
C#

#nullable disable
using System.ComponentModel.DataAnnotations;
namespace EllieBot.Db.Models;
public class ClubInfo : DbEntity
{
[MaxLength(20)]
public string Name { get; set; }
public string Description { get; set; }
public string ImageUrl { get; set; } = string.Empty;
public int Xp { get; set; } = 0;
public int? OwnerId { get; set; }
public DiscordUser Owner { get; set; }
public List<DiscordUser> Members { get; set; } = new();
public List<ClubApplicants> Applicants { get; set; } = new();
public List<ClubBans> Bans { get; set; } = new();
public override string ToString()
=> Name;
}
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; }
}