dramaling-vocab-learning/backend/DramaLing.Api/Models/DTOs/SpacedRepetition/ReviewRequest.cs

43 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.ComponentModel.DataAnnotations;
namespace DramaLing.Api.Models.DTOs.SpacedRepetition;
/// <summary>
/// 復習結果提交請求
/// </summary>
public class ReviewRequest
{
/// <summary>
/// 答題是否正確
/// </summary>
[Required]
public bool IsCorrect { get; set; }
/// <summary>
/// 信心程度 (1-5翻卡題必須)
/// </summary>
[Range(1, 5)]
public int? ConfidenceLevel { get; set; }
/// <summary>
/// 題型類型
/// </summary>
[Required]
[RegularExpression("^(flip-memory|vocab-choice|vocab-listening|sentence-listening|sentence-fill|sentence-reorder|sentence-speaking)$")]
public string QuestionType { get; set; } = string.Empty;
/// <summary>
/// 用戶的答案 (可選)
/// </summary>
public string? UserAnswer { get; set; }
/// <summary>
/// 答題時間 (毫秒)
/// </summary>
public long? TimeTaken { get; set; }
/// <summary>
/// 時間戳記
/// </summary>
public long Timestamp { get; set; } = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
}