prepare ebooks and epapers
This commit is contained in:
parent
faf6f66f04
commit
bb1a0b05ba
4 changed files with 17 additions and 0 deletions
4
Book.cs
4
Book.cs
|
@ -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)
|
||||
|
|
|
@ -10,6 +10,8 @@ namespace Bücherwurm
|
|||
|
||||
string Name {get; set;}
|
||||
|
||||
LendTypeEnum LendType {get; set;}
|
||||
|
||||
void OverwriteNullId(int id);
|
||||
}
|
||||
}
|
8
LendTypeEnum.cs
Normal file
8
LendTypeEnum.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Bücherwurm
|
||||
{
|
||||
public enum LendTypeEnum
|
||||
{
|
||||
Physical,
|
||||
Virtual,
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue