namespace GerbilManagerWebAPI.Dtos
{
/// FEEDBACK: payload for POST /feedback (the "Fehler melden" dialog).
public record FeedbackInput(
string Message,
string Context,
Guid? GerbilId,
Guid? LitterId,
Guid? ContactId,
string? EntityName,
string? Url,
DateTimeOffset? ClientTimestamp);
///
/// FEEDBACK: one past Q&A turn in the ticket's thread/history.
/// Role is "maintainer" (Rückfrage) or "breeder" (Antwort).
///
public record FeedbackThreadEntry(
string Role,
string Text,
DateTimeOffset? At);
/// FEEDBACK: lightweight metadata for an attachment (no bytes).
public record FeedbackAttachmentDto(
Guid Id,
string FileName,
string ContentType,
int Size);
/// FEEDBACK: payload to upload an attachment (base64-encoded bytes).
public record FeedbackAttachmentInput(
string FileName,
string ContentType,
string DataBase64);
/// FEEDBACK: response DTO for a stored report.
public record FeedbackDto(
Guid Id,
string Message,
string Context,
Guid? GerbilId,
Guid? LitterId,
Guid? ContactId,
string? EntityName,
string? Url,
DateTimeOffset? ClientTimestamp,
string? UserAgent,
DateTimeOffset CreatedAt,
string Status,
DateTimeOffset? ResolvedAt,
string? Question,
string? Answer,
DateTimeOffset? AnsweredAt,
/// Breeder-friendly changelog written on resolve (shown in the UI).
string? FixNote,
/// INTERNAL agent working memory — exposed for tooling, NEVER shown to the breeder.
string? AgentContext,
/// Earlier Q&A rounds, oldest first; the current open exchange stays in Question/Answer.
IReadOnlyList Thread,
/// When a genuinely-resolved ticket (no pending Rückfrage) was reopened; else null.
DateTimeOffset? ReopenedAt = null,
/// Soft-delete marker: when the ticket was deleted via the UI (recoverable); else null.
DateTimeOffset? DeletedAt = null,
/// Optional AI-set category/topic for filtering (e.g. "Genetik", "Import"); null = none.
string? Category = null,
/// Was the resolution helpful? true=👍, false=👎, null=no feedback yet.
bool? Helpful = null,
/// Attachment metadata (no bytes); fetch bytes via /feedback/attachments/{id}.
IReadOnlyList? Attachments = null);
///
/// FEEDBACK: payload for PUT /feedback/{id}. Edit the message and/or toggle status,
/// attach a clarifying question (Rückfrage), submit the breeder's answer, set the
/// breeder-friendly fix note (changelog), or update the internal agent context.
///
public record FeedbackUpdate(
string? Message,
string? Status,
string? Question,
string? Answer,
string? FixNote,
string? AgentContext,
/// Set/clear the ticket category. Empty/whitespace clears it.
string? Category = null,
/// 👍/👎 on a resolved ticket. null leaves it unchanged.
bool? Helpful = null,
///
/// Wenn true, wird nach dem Update eine Push-Benachrichtigung an die Züchterin gesendet.
/// Nur die KI/der Betreuer setzt das (z. B. neue Rückfrage / Ticket gelöst); das Frontend
/// setzt es NIE — so löst die Züchterin mit eigenen Aktionen keine Selbst-Pushes aus.
///
bool? Notify = null);
}