Initial efcore migration and updates to make sure upserting novels (mostly) works. still need to do chapter handling

This commit is contained in:
2022-07-14 23:12:12 -04:00
parent 5402923e9f
commit 5337e7ccb8
25 changed files with 962 additions and 64 deletions

View File

@@ -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; }
}

View File

@@ -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; }