Foxnouns.NET/Foxnouns.Backend/Database/Models/SupportMessage.cs

30 lines
874 B
C#

using NodaTime;
namespace Foxnouns.Backend.Database.Models;
public class SupportMessage : BaseModel
{
public Snowflake ConversationId { get; init; }
public SupportConversation Conversation { get; init; } = null!;
public Snowflake UserId { get; init; }
public User User { get; init; } = null!;
public bool IsAnonymous { get; init; }
public string? Content { get; set; }
public List<Attachment> Attachments { get; set; } = [];
public List<HistoryEntry> History { get; set; } = [];
public class Attachment
{
public required Snowflake Id { get; init; }
public required string Hash { get; init; }
public required string ContentType { get; init; }
}
public class HistoryEntry
{
public required Instant Timestamp { get; init; }
public required string? Content { get; init; }
}
}