magazines continued

This commit is contained in:
nek0 2020-04-28 11:20:42 +02:00
parent 01d0fdd505
commit 88c7635439
1 changed files with 23 additions and 2 deletions

View File

@ -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;
}
}
}