Buecherwurm/Magazine.cs

42 lines
No EOL
900 B
C#

using System.Text.Json.Serialization;
namespace Bücherwurm
{
public class Magazine : IProduct
{
[JsonIgnore]
public int ProductId {get; set;}
[JsonIgnore]
public CategoryEnum 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 = CategoryEnum.Magazine;
LendTime = 2;
}
}
}