Lots of changes to get code ready to add library.

This commit is contained in:
Joseph Milazzo 2020-12-17 11:27:19 -06:00
parent 67b97b3be2
commit d5eed4e85d
20 changed files with 570 additions and 3 deletions

View file

@ -1,4 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using API.Entities.Interfaces;
@ -14,6 +16,7 @@ namespace API.Entities
public DateTime Created { get; set; } = DateTime.Now;
public DateTime LastActive { get; set; }
public bool IsAdmin { get; set; }
public ICollection<Library> Libraries { get; set; }
[ConcurrencyCheck]
public uint RowVersion { get; set; }

View file

@ -0,0 +1,10 @@
namespace API.Entities
{
public class FolderPath
{
public int Id { get; set; }
public string Path { get; set; }
public Library Library { get; set; }
public int LibraryId { get; set; }
}
}

16
API/Entities/Library.cs Normal file
View file

@ -0,0 +1,16 @@
using System.Collections.Generic;
namespace API.Entities
{
public class Library
{
public int Id { get; set; }
public string Name { get; set; }
public string CoverImage { get; set; }
public LibraryType Type { get; set; }
public ICollection<FolderPath> Folders { get; set; }
public AppUser AppUser { get; set; }
public int AppUserId { get; set; }
}
}

View file

@ -0,0 +1,16 @@
using System.ComponentModel;
namespace API.Entities
{
public enum LibraryType
{
[Description("Manga")]
Manga = 0,
[Description("Comic")]
Comic = 1,
[Description("Book")]
Book = 2,
[Description("Raw")]
Raw = 3
}
}