Profile page finished
This commit is contained in:
@@ -73,6 +73,15 @@ public class MovieRatedQueryParameters : QueryParameters<MovieRatedResponse>
|
||||
[FromQuery(Name = "user_rating_to")]
|
||||
public decimal? UserRatingTo { get; set; }
|
||||
|
||||
[FromQuery(Name = "user_rating_date")]
|
||||
public DateOnly? UserRatingDate { get; set; }
|
||||
|
||||
[FromQuery(Name = "user_rating_date_from")]
|
||||
public DateOnly? UserRatingDateFrom { get; set; }
|
||||
|
||||
[FromQuery(Name = "user_rating_date_to")]
|
||||
public DateOnly? UserRatingDateTo { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -98,6 +107,8 @@ public class MovieRatedQueryParameters : QueryParameters<MovieRatedResponse>
|
||||
TestContains(Genres, item.Genres.Select(x => x.Id))
|
||||
&&
|
||||
TestComparable((decimal)item.UserRating, UserRating, UserRatingFrom, UserRatingTo)
|
||||
&&
|
||||
TestComparable(item.UserRatingDate, UserRatingDate, UserRatingDateFrom, UserRatingDateTo)
|
||||
);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -24,12 +24,16 @@ public class MovieRatedResponse : MovieResponse, IQueryOrderable<MovieRatedRespo
|
||||
{ "budget", x => x.Budget },
|
||||
{ "rating.average", x => x.Rating.Average },
|
||||
{ "rating.count", x => x.Rating.Count },
|
||||
{ "user_rating", x => x.UserRating }
|
||||
{ "user_rating", x => x.UserRating },
|
||||
{ "user_rating_date", x => x.UserRatingDate }
|
||||
};
|
||||
|
||||
[JsonPropertyName("user_rating")]
|
||||
public short UserRating { get; set; }
|
||||
|
||||
[JsonPropertyName("user_rating_date")]
|
||||
public DateTime UserRatingDate { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -54,6 +58,7 @@ public class MovieRatedResponse : MovieResponse, IQueryOrderable<MovieRatedRespo
|
||||
.Build();
|
||||
Genres = mediaMovie.Media.Genres.Select(x => new GenreResponse(x)).ToList();
|
||||
UserRating = response.Rating;
|
||||
UserRatingDate = response.Date;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user