Refactor and novel18 support (added cookie support in general to AbstractScraper.cs
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
39
Common/Models/DBDomain/Novel.cs
Normal file
39
Common/Models/DBDomain/Novel.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Common.Models.Enums;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Common.Models.DBDomain
|
||||
{
|
||||
[Index(nameof(Guid))]
|
||||
public class Novel : BaseEntity
|
||||
{
|
||||
[Key]
|
||||
public string Url { get; set; }
|
||||
public Guid Guid { get; set; }
|
||||
public string Title { get; set; }
|
||||
public Author? Author { get; set; }
|
||||
public List<Tag> Tags { get; set; }
|
||||
public List<Chapter> Chapters { get; set; }
|
||||
public NovelStatus Status { get; set; }
|
||||
public DateTime LastUpdated { get; set; }
|
||||
public DateTime DatePosted { get; set; }
|
||||
|
||||
protected bool Equals(Novel 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((Novel) obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Url.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user