using System.ComponentModel.DataAnnotations;
namespace DorkNet.Server.Data.Entities;
///
/// A "Group" / club — wire type RecNet.Group
/// (Cpp2IL_CS/.../RecNet/Group.cs). Field names + types match
/// the client's Group.Deserialize shape so the watch round-
/// trips cleanly. Surfaces in the watch's profile tab as the player's
/// primary-group affiliation.
///
public class ClubEntity
{
/// Mirrors wire field GroupId.
public long Id { get; set; }
[MaxLength(128)]
public string Name { get; set; } = string.Empty;
[MaxLength(2000)]
public string Description { get; set; } = string.Empty;
/// Mirrors wire CreatorId (Int32). Cast to int
/// in serialiser.
public long CreatorPlayerId { get; set; }
[MaxLength(256)]
public string ImageName { get; set; } = string.Empty;
/// GroupBanStatus enum: 0=GoodStanding, 1=InReview,
/// 2=TempLock, 3=Permaban.
public int BanStatus { get; set; } = 0;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
/// One row per (club, player). Permissions is the
/// GroupMembershipPermissions flags enum (Member=0, Moderator=24,
/// CoOwner=124, Owner=127, Pending=128 for join-requests on private
/// groups).
public class ClubMembershipEntity
{
public long Id { get; set; }
public long ClubId { get; set; }
public long PlayerId { get; set; }
/// GroupMembershipPermissions flags enum value.
public int Permissions { get; set; } = 0;
public DateTime JoinedAt { get; set; } = DateTime.UtcNow;
}