using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CommonModel
{
public class PageSearch : PageBase
{
///
/// 统一查询
///
public string? Search { get; set; }
///
/// 开始日期
///
public DateTime? StartDate { get; set; }
///
/// 结束日期
///
public DateTime? EndDate { get; set; }
}
public class PageSearch : PageSearch
{
///
/// 查询条件
///
public T? Mode { get; set; }
}
public class PageDaySearch : PageSearch {
public PageDaySearch()
{
var DateNow = DateTime.Now;
if (StartDate == null && EndDate == null)
{
StartDate = DateTime.Today;
EndDate = DateNow;
}
else if (StartDate == null)
{
StartDate = DateTime.Today;
}
else if (EndDate == null)
{
EndDate = DateNow;
}
}
}
public class PageDaySearch : PageDaySearch {
///
/// 查询条件
///
public T? Mode { get; set; }
}
public class PageMonthSearch : PageSearch
{
public PageMonthSearch()
{
var DateNow = DateTime.Now;
if (StartDate == null && EndDate == null)
{
StartDate = DateNow.AddMonths(-1);
EndDate = DateNow;
}
else if (StartDate == null)
{
StartDate = DateNow.AddMonths(-1);
}
else if (EndDate == null)
{
EndDate = DateNow;
}
}
}
public class PageMonthSearch : PageMonthSearch
{
///
/// 查询条件
///
public T? Mode { get; set; }
}
public class PageYearSearch : PageSearch
{
public PageYearSearch()
{
var DateNow = DateTime.Now;
if (StartDate == null && EndDate == null)
{
StartDate = DateNow.AddYears(-1);
EndDate = DateNow;
}
else if (StartDate == null)
{
StartDate = DateNow.AddYears(-1);
}
else if (EndDate == null)
{
EndDate = DateNow;
}
}
}
public class PageYearSearch : PageYearSearch
{
///
/// 查询条件
///
public T? Mode { get; set; }
}
}