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

45 lines
No EOL
996 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 LendTypeEnum LendType {get; set;}
public void OverwriteNullId(int Id)
{
if (ProductId == 0)
{
ProductId = Id;
}
}
public Magazine()
{
Category = CategoryEnum.Magazine;
LendTime = 2;
LendType = LendTypeEnum.Physical;
}
}
}