Buecherwurm/Magazine.cs
2020-04-28 15:11:31 +02:00

42 lines
883 B
C#

using System.Text.Json.Serialization;
namespace Bücherwurm
{
public class Magazine : IProduct
{
[JsonIgnore]
public int ProductId {get; set;}
[JsonIgnore]
public string Category {get; set;}
[JsonIgnore]
public int LendTime {get; set;}
[JsonPropertyName("Titel")]
public string Name {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)
{
ProductId = Id;
}
}
public Magazine()
{
Category = "magazine";
LendTime = 2;
}
}
}