Lots of changes to get code ready to add library.
This commit is contained in:
parent
67b97b3be2
commit
d5eed4e85d
20 changed files with 570 additions and 3 deletions
|
@ -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; }
|
||||
|
|
10
API/Entities/FolderPath.cs
Normal file
10
API/Entities/FolderPath.cs
Normal 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
16
API/Entities/Library.cs
Normal 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; }
|
||||
}
|
||||
}
|
16
API/Entities/LibraryType.cs
Normal file
16
API/Entities/LibraryType.cs
Normal 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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue