using System.ComponentModel.DataAnnotations;
namespace DorkNet.Server.Data.Entities;
///
/// One in-game player report. Created by any authenticated player via
/// the watch's "report player" UI; surfaces in the admin moderation
/// queue at GET api/admin/v1/reports until an admin resolves it.
///
public class ReportEntity
{
public long Id { get; set; }
/// Account id of the player filing the report.
public long ReporterPlayerId { get; set; }
/// Account id of the player being reported.
public long TargetPlayerId { get; set; }
/// Free-form category the watch sends — convention is
/// numeric matching the client's RoomieReportCategory enum
/// (Harassment=1, Inappropriate=2, Cheating=3, Spam=4, Other=5).
public int Category { get; set; }
/// The reporter's free-text description. Capped at 1000
/// chars by the watch UI.
[MaxLength(1000)]
public string Message { get; set; } = string.Empty;
/// Optional game session id for context — admins can
/// correlate to room/server logs around the time of the report.
public long GameSessionId { get; set; }
/// Room the offending behaviour happened in (0 if N/A).
public long RoomId { get; set; }
/// If the report targets an invention, the invention id
/// (0 otherwise).
public long TargetInventionId { get; set; }
/// If the report targets a room (rather than the player
/// in it), the room id (0 otherwise).
public long TargetRoomId { get; set; }
/// If the report targets a player event, the event id
/// (0 otherwise).
public long TargetEventId { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
/// Null while the report sits in the admin queue; set
/// when an admin resolves it via
/// POST api/admin/v1/reports/{id}/resolve. Together with
/// +
/// forms the full audit trail.
public DateTime? ResolvedAt { get; set; }
public long? ResolverAdminId { get; set; }
[MaxLength(512)]
public string ResolutionNote { get; set; } = string.Empty;
}