41 lines
1.5 KiB
C#
41 lines
1.5 KiB
C#
using Bibblan.Models;
|
|
|
|
namespace Bibblan.ViewModels
|
|
{
|
|
public class BookDetailVm
|
|
{
|
|
public Books Book { get; internal set; }
|
|
public IEnumerable<Authors> Authors { get; internal set; }
|
|
public IEnumerable<Publishers> Publishers { get; internal set; }
|
|
public IEnumerable<BooksLanguagesLink> Language { get; internal set; }
|
|
public IEnumerable<BooksRatingsLink> Ratings { get; internal set; }
|
|
public IEnumerable<Series> Series { get; internal set; }
|
|
public IEnumerable<Tags> Tags { get; internal set; }
|
|
public IEnumerable<Comments> Comments { get; internal set; }
|
|
public IEnumerable<Data> Data { get; internal set; }
|
|
}
|
|
|
|
public class BookVm
|
|
{
|
|
public long Id { get; set; }
|
|
public string Title { get; set; }
|
|
public string Author { get; set; }
|
|
public long AuthorId { get; set; }
|
|
public string Comments { get; set; }
|
|
public string Language { get; set; }
|
|
public string Path { get; set; }
|
|
public List<DataVm> Formats { get; set; }
|
|
public bool HasCover { get; set; }
|
|
public string SeriesName { get; set; }
|
|
public double SeriesNumber { get; set; }
|
|
|
|
public string TitleAndSeries
|
|
{
|
|
get
|
|
{
|
|
return Title + (!string.IsNullOrWhiteSpace(SeriesName) ? $" ({SeriesName + (SeriesNumber > 0 ? $" {SeriesNumber:##}" : string.Empty)})" : string.Empty);
|
|
}
|
|
}
|
|
}
|
|
}
|