magazines continued

This commit is contained in:
nek0 2020-04-28 11:20:42 +02:00
parent 01d0fdd505
commit 88c7635439

View file

@ -1,15 +1,30 @@
using System.Text.Json.Serialization;
namespace Bücherwurm namespace Bücherwurm
{ {
public class Magazine : IProduct public class Magazine : IProduct
{ {
[JsonIgnore]
public int ProductId {get; set;} public int ProductId {get; set;}
public string ImageLink {get; set;} [JsonIgnore]
public string Category {get; set;} public string Category {get; set;}
[JsonIgnore]
public int LendTime {get; set;} 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) public void OverwriteNullId(int Id)
{ {
if (ProductId == 0) if (ProductId == 0)
@ -17,5 +32,11 @@ namespace Bücherwurm
ProductId = Id; ProductId = Id;
} }
} }
public Magazine()
{
Category = "magazine";
LendTime = 2;
}
} }
} }