Rough version of Saving Series, Volumes, and MangaFiles to the DB. Relies on Cascaded delete rather than manually handling updating of file changes.
This commit is contained in:
parent
104c63b2b9
commit
380c3e7b3c
16 changed files with 949 additions and 15 deletions
|
|
@ -10,5 +10,6 @@ namespace API.Entities
|
|||
public LibraryType Type { get; set; }
|
||||
public ICollection<FolderPath> Folders { get; set; }
|
||||
public ICollection<AppUser> AppUsers { get; set; }
|
||||
public ICollection<Series> Series { get; set; }
|
||||
}
|
||||
}
|
||||
14
API/Entities/MangaFile.cs
Normal file
14
API/Entities/MangaFile.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
namespace API.Entities
|
||||
{
|
||||
public class MangaFile
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
//public string FileExtension { get; set; }
|
||||
|
||||
// Relationship Mapping
|
||||
public Volume Volume { get; set; }
|
||||
public int VolumeId { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ namespace API.Entities
|
|||
{
|
||||
public class Series
|
||||
{
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// The UI visible Name of the Series. This may or may not be the same as the OriginalName
|
||||
/// </summary>
|
||||
|
|
@ -20,9 +21,11 @@ namespace API.Entities
|
|||
/// Summary information related to the Series
|
||||
/// </summary>
|
||||
public string Summary { get; set; }
|
||||
|
||||
public ICollection<Volume> Volumes { get; set; }
|
||||
|
||||
public Library Library { get; set; }
|
||||
public int LibraryId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -4,8 +4,9 @@ namespace API.Entities
|
|||
{
|
||||
public class Volume
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Number { get; set; }
|
||||
public ICollection<string> Files { get; set; }
|
||||
public ICollection<MangaFile> Files { get; set; }
|
||||
|
||||
// Many-to-Many relationships
|
||||
public Series Series { get; set; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue