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

39 lines
1.1 KiB
C#

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();
}
}
}