Files
WebNovelPortal/Common/Models/DBDomain/Author.cs
littlefoot ceb8a0db8e
All checks were successful
continuous-integration/drone/push Build is passing
Refactor and novel18 support (added cookie support in general to AbstractScraper.cs
2022-07-20 22:04:13 -04:00

32 lines
810 B
C#

using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
namespace Common.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();
}
}
}