using System;
using System.Collections.Generic;
using System.Text;
using PhilExampleCrawler.Common.Interfaces;
namespace PhilExampleCrawler.Common.Models
{
///
/// TODO: turn into record (+ rename to CrawlRequest?)
///
public class CrawlSession : IDeepCloneable
{
public int ID { get; set; }
public CrawlSearchParams SearchParams { get; set; }
public int MinPrice { get; set; }
public int MaxPrice { get; set; }
public bool IsPrivate { get; set; }
public bool IsCommercial { get; set; }
public CrawlSession(int id, CrawlSearchParams searchParams,
int minPrice = -1, int maxPrice = -1,
bool isPrivate = false,
bool isCommercial = false)
{
ID = id;
SearchParams = searchParams;
MinPrice = minPrice;
MaxPrice = maxPrice;
IsPrivate = isPrivate;
IsCommercial = isCommercial;
}
public CrawlSession Clone()
{
return new CrawlSession(ID, SearchParams, MinPrice, MaxPrice, IsPrivate, IsCommercial);
}
}
}