add classes

This commit is contained in:
nek0 2020-04-23 13:27:32 +02:00
parent 2deaa81772
commit 4b26421368
5 changed files with 100 additions and 0 deletions

10
Administration.cs Normal file
View file

@ -0,0 +1,10 @@
namespace Bücherwurm
{
class Administration
{
public Administration()
{
}
}
}

38
Book.cs Normal file
View file

@ -0,0 +1,38 @@
namespace Bücherwurm
{
class Book
{
public int BookId {get;}
public string Title {get; set;}
public string Author {get; set;}
public string Country {get; set;}
public string ImageLink {get; set;}
public string Link {get; set;}
public string Language {get; set;}
public int Pages {get; set;}
public int Year {get; set;}
public Book(int Id, string Title, string Author,
string Country, string ILink, string Link, string Language,
int Pages, int Year)
{
BookId = Id;
this.Title = Title;
this.Author = Author;
this.Country = Country;
ImageLink = ILink;
this.Link = Link;
this.Language = Language;
this.Pages = Pages;
this.Year = Year;
}
}
}

18
Item.cs Normal file
View file

@ -0,0 +1,18 @@
namespace Bücherwurm
{
partial class Item
{
public int ItemId {get;}
public int BookId {get;}
public StatusEnum Status {get; set;}
public Item(int Id, int BookId)
{
ItemId = Id;
this.BookId = BookId;
Status = StatusEnum.Available;
}
}
}

23
Lending.cs Normal file
View file

@ -0,0 +1,23 @@
using System;
namespace Bücherwurm
{
class Lending
{
public int LendId {get;}
public int[] LendItems {get; set;}
public DateTime ReturnDate {get;}
public string Customer {get; }
public Lending(int Id, int[] Items, string Customer)
{
LendId = Id;
LendItems = Items;
ReturnDate = DateTime.Now.AddDays(30);
this.Customer = Customer;
}
}
}

11
StatusEnum.cs Normal file
View file

@ -0,0 +1,11 @@
namespace Bücherwurm
{
partial class Item
{
public enum StatusEnum
{
Available,
Lended
}
}
}