diff --git a/Magazine.cs b/Magazine.cs index 5500b16..fede835 100644 --- a/Magazine.cs +++ b/Magazine.cs @@ -1,15 +1,30 @@ +using System.Text.Json.Serialization; + namespace Bücherwurm { public class Magazine : IProduct { + [JsonIgnore] public int ProductId {get; set;} - public string ImageLink {get; set;} - + [JsonIgnore] public string Category {get; set;} + [JsonIgnore] public int LendTime {get; set;} + [JsonPropertyName("Titel")] + public string Title {get; set;} + + [JsonPropertyName("Auflage")] + public string Run {get; set;} + + [JsonPropertyName("Gruppe")] + public string Audience {get; set;} + + [JsonPropertyName("Sachgruppe")] + public string Topic {get; set;} + public void OverwriteNullId(int Id) { if (ProductId == 0) @@ -17,5 +32,11 @@ namespace Bücherwurm ProductId = Id; } } + + public Magazine() + { + Category = "magazine"; + LendTime = 2; + } } } \ No newline at end of file