ColourBreakBugReport.cs

Data model for a player bug report and a log wrapper. ColourBreakBugReport stores id, message, reporter name, SteamId, context, version, timestamp, resolved flag, and a formatted local time getter. ColourBreakBugReportLog wraps a list of reports for cookie persistence.

using System;
using System.Collections.Generic;

// A single player-submitted bug report plus the context captured at submit time.
public sealed class ColourBreakBugReport
{
	public string Id { get; set; } = Guid.NewGuid().ToString( "N" );
	public string Message { get; set; } = "";
	public string Reporter { get; set; } = "";
	public long SteamId { get; set; }
	public string Context { get; set; } = "";   // e.g. "Endless - Score 1200" or "Level 4"
	public string Version { get; set; } = "";
	public long TimestampUnix { get; set; } = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
	public bool Resolved { get; set; }

	public string WhenText
	{
		get
		{
			try { return DateTimeOffset.FromUnixTimeSeconds( TimestampUnix ).LocalDateTime.ToString( "yyyy-MM-dd HH:mm" ); }
			catch { return "-"; }
		}
	}
}

// Wrapper persisted as a single cookie value (mirrors ColourBreakSaveData usage).
public sealed class ColourBreakBugReportLog
{
	public List<ColourBreakBugReport> Reports { get; set; } = new();
}