prepare ebooks and epapers

This commit is contained in:
nek0 2020-04-28 15:36:36 +02:00
parent faf6f66f04
commit bb1a0b05ba
4 changed files with 17 additions and 0 deletions

View File

@ -32,6 +32,8 @@ namespace Bücherwurm
public string ImageLink { get; set; }
[JsonIgnore]
public int LendTime {get; set;}
[JsonIgnore]
public LendTypeEnum LendType {get; set;}
public Book(int Id, string Title, string Author,
string Country, string ILink, string Link, string Language,
@ -40,6 +42,7 @@ namespace Bücherwurm
ProductId = Id;
Category = CategoryEnum.Book;
LendTime = 30;
LendType = LendTypeEnum.Physical;
this.Name = Title;
this.Author = Author;
this.Country = Country;
@ -54,6 +57,7 @@ namespace Bücherwurm
{
Category = CategoryEnum.Book;
LendTime = 30;
LendType = LendTypeEnum.Physical;
}
public void OverwriteNullId(int id)

View File

@ -10,6 +10,8 @@ namespace Bücherwurm
string Name {get; set;}
LendTypeEnum LendType {get; set;}
void OverwriteNullId(int id);
}
}

8
LendTypeEnum.cs Normal file
View File

@ -0,0 +1,8 @@
namespace Bücherwurm
{
public enum LendTypeEnum
{
Physical,
Virtual,
}
}

View File

@ -25,6 +25,8 @@ namespace Bücherwurm
[JsonPropertyName("Sachgruppe")]
public string Topic {get; set;}
public LendTypeEnum LendType {get; set;}
public void OverwriteNullId(int Id)
{
if (ProductId == 0)
@ -37,6 +39,7 @@ namespace Bücherwurm
{
Category = CategoryEnum.Magazine;
LendTime = 2;
LendType = LendTypeEnum.Physical;
}
}
}