Move source code into "Source" folder
This commit is contained in:
parent
1ee73fa1a7
commit
389fbb2371
287 changed files with 26 additions and 8 deletions
31
Source/DataLayer/EfClasses/BookContributor.cs
Normal file
31
Source/DataLayer/EfClasses/BookContributor.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using Dinah.Core;
|
||||
|
||||
namespace DataLayer
|
||||
{
|
||||
public enum Role { Author = 1, Narrator = 2, Publisher = 3 }
|
||||
|
||||
public class BookContributor
|
||||
{
|
||||
internal int BookId { get; private set; }
|
||||
internal int ContributorId { get; private set; }
|
||||
public Role Role { get; private set; }
|
||||
public byte Order { get; private set; }
|
||||
|
||||
public Book Book { get; private set; }
|
||||
public Contributor Contributor { get; private set; }
|
||||
|
||||
private BookContributor() { }
|
||||
internal BookContributor(Book book, Contributor contributor, Role role, byte order)
|
||||
{
|
||||
ArgumentValidator.EnsureNotNull(book, nameof(book));
|
||||
ArgumentValidator.EnsureNotNull(contributor, nameof(contributor));
|
||||
|
||||
Book = book;
|
||||
Contributor = contributor;
|
||||
Role = role;
|
||||
Order = order;
|
||||
}
|
||||
|
||||
public override string ToString() => $"{Book} {Contributor} {Role} {Order}";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue