Kavita/API/Entities/Metadata/SeriesRelation.cs
Joe Milazzo 15e09a0cf1
Fixed Series Relations Schema (#1654)
* Bump loader-utils from 2.0.2 to 2.0.3 in /UI/Web

Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.3/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fixed is want to read coming back as a string and not working correctly.

* Changed from to Continue to be more explicit

* Added the first migration which exports data as a csv in temp/. This is the backup in case data is lost in the migration.

* Note for later

* Fixed the migration for the series relation so when deleting any series on any edge of the relationship, the SeriesRelation row deletes.

* Change buttons back to titles on series detail page

* Wrote the code to import relations from the backup.

* Added an additional version check to avoid file io on migration.

* Code cleanup

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 06:45:02 -08:00

24 lines
615 B
C#

using API.Entities.Enums;
namespace API.Entities.Metadata;
/// <summary>
/// A relation flows between one series and another.
/// Series ---kind---> target
/// </summary>
public sealed class SeriesRelation
{
public int Id { get; set; }
public RelationKind RelationKind { get; set; }
public Series TargetSeries { get; set; }
/// <summary>
/// A is Sequel to B. In this example, TargetSeries is A. B will hold the foreign key.
/// </summary>
public int TargetSeriesId { get; set; }
// Relationships
public Series Series { get; set; }
public int SeriesId { get; set; }
}