From bb1a0b05ba8b58880cff12a919fdb28deeca4fa6 Mon Sep 17 00:00:00 2001 From: nek0 Date: Tue, 28 Apr 2020 15:36:36 +0200 Subject: [PATCH] prepare ebooks and epapers --- Book.cs | 4 ++++ IProduct.cs | 2 ++ LendTypeEnum.cs | 8 ++++++++ Magazine.cs | 3 +++ 4 files changed, 17 insertions(+) create mode 100644 LendTypeEnum.cs diff --git a/Book.cs b/Book.cs index d318bc8..12f40cd 100644 --- a/Book.cs +++ b/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) diff --git a/IProduct.cs b/IProduct.cs index 41baec6..b9fb862 100644 --- a/IProduct.cs +++ b/IProduct.cs @@ -10,6 +10,8 @@ namespace Bücherwurm string Name {get; set;} + LendTypeEnum LendType {get; set;} + void OverwriteNullId(int id); } } \ No newline at end of file diff --git a/LendTypeEnum.cs b/LendTypeEnum.cs new file mode 100644 index 0000000..ca3a805 --- /dev/null +++ b/LendTypeEnum.cs @@ -0,0 +1,8 @@ +namespace Bücherwurm +{ + public enum LendTypeEnum + { + Physical, + Virtual, + } +} \ No newline at end of file diff --git a/Magazine.cs b/Magazine.cs index 8ffc42e..f79137c 100644 --- a/Magazine.cs +++ b/Magazine.cs @@ -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; } } } \ No newline at end of file