Initial efcore migration and updates to make sure upserting novels (mostly) works. still need to do chapter handling
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace DBConnection.Models;
|
||||
|
||||
@@ -7,5 +8,6 @@ public class Author : BaseEntity
|
||||
[Key]
|
||||
public string Url { get; set; }
|
||||
public string Name { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<Novel> Novels { get; set; }
|
||||
}
|
||||
@@ -4,11 +4,11 @@ namespace DBConnection.Models;
|
||||
|
||||
public class Chapter : BaseEntity
|
||||
{
|
||||
[Key]
|
||||
public int ChapterNumber { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Content { get; set; }
|
||||
public string? RawContent { get; set; }
|
||||
[Key]
|
||||
public string Url { get; set; }
|
||||
public DateTime DatePosted { get; set; }
|
||||
public DateTime DateUpdated { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user