34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using MongoDB.Bson;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
|
|
namespace QuestionsApi.Models;
|
|
|
|
public class QuestionAttempt
|
|
{
|
|
[BsonId]
|
|
[BsonRepresentation(BsonType.ObjectId)]
|
|
public string? Id { get; set; }
|
|
|
|
public string QuestionExternalId { get; set; } = "";
|
|
public string UserId { get; set; } = "";
|
|
public string ChoiceId { get; set; } = "";
|
|
public List<string> PresentedChoiceIds { get; set; } = [];
|
|
public bool TracksPresentation { get; set; }
|
|
public bool IsCorrect { get; set; }
|
|
public bool IsSkip { get; set; }
|
|
public int DurationSeconds { get; set; }
|
|
public int CounterBucket { get; set; }
|
|
public bool? RatingApplied { get; set; }
|
|
public int? UserOverallEloAfter { get; set; }
|
|
public DateTime? RatingAppliedUtc { get; set; }
|
|
public string RatingLeaseOwner { get; set; } = "";
|
|
public DateTime RatingLeaseUntilUtc { get; set; }
|
|
public DateTime CreatedUtc { get; set; } = DateTime.UtcNow;
|
|
}
|
|
|
|
public sealed class QuestionAttemptRecordResult
|
|
{
|
|
public bool Inserted { get; set; }
|
|
public QuestionAttempt Attempt { get; set; } = new();
|
|
}
|