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:
32
Common/Models/DBDomain/UserNovel.cs
Normal file
32
Common/Models/DBDomain/UserNovel.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Models.DBDomain
|
||||
{
|
||||
public class UserNovel
|
||||
{
|
||||
public int UserId { get; set; }
|
||||
public string NovelUrl { get; set; }
|
||||
public Novel Novel { get; set; }
|
||||
[JsonIgnore]
|
||||
public User User { get; set; }
|
||||
public int LastChapterRead { get; set; }
|
||||
|
||||
protected bool Equals(UserNovel other)
|
||||
{
|
||||
return UserId == other.UserId && NovelUrl == other.NovelUrl;
|
||||
}
|
||||
|
||||
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((UserNovel) obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(UserId, NovelUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user