Updated lots of stuff, got multi scrape working, need to test not-nullable chapter novel ids with our current model, now supports sqlite and postgres concurrently (and easy add more), need to get it deployed/do auth
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
32
Treestar.Shared/Models/DBDomain/Author.cs
Normal file
32
Treestar.Shared/Models/DBDomain/Author.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Treestar.Shared.Models.DBDomain
|
||||
{
|
||||
public class Author : BaseEntity
|
||||
{
|
||||
[Key]
|
||||
public string Url { get; set; }
|
||||
public string Name { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<Novel> Novels { get; set; }
|
||||
|
||||
protected bool Equals(Author other)
|
||||
{
|
||||
return Url == other.Url;
|
||||
}
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (ReferenceEquals(null, obj)) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
if (obj.GetType() != this.GetType()) return false;
|
||||
return Equals((Author) obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Url.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user