From 88c76354396b827959073dd4f0842f7845c51a54 Mon Sep 17 00:00:00 2001 From: nek0 Date: Tue, 28 Apr 2020 11:20:42 +0200 Subject: [PATCH] magazines continued --- Magazine.cs | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) 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