Initial commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace FictionArchive.Service.NovelService.Models.Novels;
|
||||
|
||||
public abstract class BaseEntity<TKey>
|
||||
{
|
||||
public uint Id { get; set; }
|
||||
public DateTime CreatedUtc { get; set; }
|
||||
public DateTime UpdatedUtc { get; set; }
|
||||
}
|
||||
13
FictionArchive.Service.NovelService/Models/Novels/Chapter.cs
Normal file
13
FictionArchive.Service.NovelService/Models/Novels/Chapter.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using FictionArchive.Service.NovelService.Models.Localization;
|
||||
|
||||
namespace FictionArchive.Service.NovelService.Models.Novels;
|
||||
|
||||
public class Chapter : BaseEntity<uint>
|
||||
{
|
||||
public uint Revision { get; set; }
|
||||
public uint Order { get; set; }
|
||||
public string? Url { get; set; }
|
||||
|
||||
public LocalizationKey Name { get; set; }
|
||||
public LocalizationKey Body { get; set; }
|
||||
}
|
||||
24
FictionArchive.Service.NovelService/Models/Novels/Novel.cs
Normal file
24
FictionArchive.Service.NovelService/Models/Novels/Novel.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using FictionArchive.Common.Enums;
|
||||
using FictionArchive.Service.NovelService.Models.Localization;
|
||||
using NovelStatus = FictionArchive.Service.NovelService.Models.Enums.NovelStatus;
|
||||
|
||||
namespace FictionArchive.Service.NovelService.Models.Novels;
|
||||
|
||||
public class Novel : BaseEntity<uint>
|
||||
{
|
||||
public Person Author { get; set; }
|
||||
public string Url { get; set; }
|
||||
public Language RawLanguage { get; set; }
|
||||
|
||||
public NovelStatus RawStatus { get; set; }
|
||||
public NovelStatus? StatusOverride { get; set; }
|
||||
|
||||
public Source Source { get; set; }
|
||||
public string ExternalId { get; set; }
|
||||
|
||||
public LocalizationKey Name { get; set; }
|
||||
public LocalizationKey Description { get; set; }
|
||||
|
||||
public List<Chapter> Chapters { get; set; }
|
||||
public List<NovelTag> Tags { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using FictionArchive.Service.NovelService.Models.Enums;
|
||||
using FictionArchive.Service.NovelService.Models.Localization;
|
||||
|
||||
namespace FictionArchive.Service.NovelService.Models.Novels;
|
||||
|
||||
public class NovelTag : BaseEntity<uint>
|
||||
{
|
||||
public string Key { get; set; }
|
||||
public LocalizationKey DisplayName { get; set; }
|
||||
public TagType TagType { get; set; }
|
||||
|
||||
public Source? Source { get; set; }
|
||||
public List<Novel> Novels { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace FictionArchive.Service.NovelService.Models.Novels;
|
||||
|
||||
public class Person : BaseEntity<uint>
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string? ExternalUrl { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace FictionArchive.Service.NovelService.Models.Novels;
|
||||
|
||||
public class Source : BaseEntity<uint>
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Key { get; set; }
|
||||
public string Url { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using FictionArchive.Service.NovelService.Models.Novels;
|
||||
|
||||
namespace FictionArchive.Service.NovelService.Models;
|
||||
|
||||
public class SourceConfiguration : BaseEntity<uint>
|
||||
{
|
||||
public string Key { get; set; }
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string Configuration { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace FictionArchive.Service.NovelService.Models.Novels;
|
||||
|
||||
public class TranslationEngine : BaseEntity<uint>
|
||||
{
|
||||
public string Key { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user