Files
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

37 lines
1.1 KiB
C#

using System.ComponentModel.DataAnnotations;
namespace Common.Models.DBDomain
{
public class Chapter : BaseEntity
{
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; }
public DateTime? LastContentFetch { get; set; }
[Required]
public Novel Novel { get; set; }
protected bool Equals(Chapter 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((Chapter) obj);
}
public override int GetHashCode()
{
return Url.GetHashCode();
}
}
}