2024-09-20 23:37:55 +02:00
|
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
2024-09-28 02:36:53 +02:00
|
|
|
namespace WatchIt.Common.Model.Rating;
|
2024-09-20 23:37:55 +02:00
|
|
|
|
2024-09-28 02:36:53 +02:00
|
|
|
public class RatingResponse
|
2024-09-20 23:37:55 +02:00
|
|
|
{
|
|
|
|
|
#region PROPERTIES
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("rating_average")]
|
|
|
|
|
public required double RatingAverage { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("rating_count")]
|
|
|
|
|
public required long RatingCount { get; set; }
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region CONSTRUCTORS
|
|
|
|
|
|
|
|
|
|
[JsonConstructor]
|
2024-09-28 02:36:53 +02:00
|
|
|
public RatingResponse() {}
|
2024-09-20 23:37:55 +02:00
|
|
|
|
|
|
|
|
[SetsRequiredMembers]
|
2024-09-28 02:36:53 +02:00
|
|
|
public RatingResponse(double ratingAverage, long ratingCount)
|
2024-09-20 23:37:55 +02:00
|
|
|
{
|
|
|
|
|
RatingAverage = ratingAverage;
|
|
|
|
|
RatingCount = ratingCount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|