movie page added
This commit is contained in:
36
WatchIt.Common/WatchIt.Common.Model/Media/MediaResponse.cs
Normal file
36
WatchIt.Common/WatchIt.Common.Model/Media/MediaResponse.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace WatchIt.Common.Model.Media;
|
||||
|
||||
public class MediaResponse : Media
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public long Id { get; set; }
|
||||
|
||||
public MediaType Type { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
[JsonConstructor]
|
||||
public MediaResponse() {}
|
||||
|
||||
[SetsRequiredMembers]
|
||||
public MediaResponse(Database.Model.Media.Media media, MediaType mediaType)
|
||||
{
|
||||
Id = media.Id;
|
||||
Title = media.Title;
|
||||
OriginalTitle = media.OriginalTitle;
|
||||
Description = media.Description;
|
||||
ReleaseDate = media.ReleaseDate;
|
||||
Length = media.Length;
|
||||
Type = mediaType;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
7
WatchIt.Common/WatchIt.Common.Model/Media/MediaType.cs
Normal file
7
WatchIt.Common/WatchIt.Common.Model/Media/MediaType.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace WatchIt.Common.Model.Media;
|
||||
|
||||
public enum MediaType
|
||||
{
|
||||
Movie,
|
||||
Series
|
||||
}
|
||||
Reference in New Issue
Block a user