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

View file

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