using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace YBDevice.NWeb.Pages.Device
{
    public class DetailModel : BaseModel
    {
        public int devid = 0;
        public string defaulttime = "";
        public string maxtime = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
        public string mintime = DateTime.Now.AddDays(-1).AddMonths(-1).ToString("yyyyy-MM-dd");
        public string time = $"{DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd")} ~ {DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}";
        public void OnGet(int id)
        {
            defaulttime = $"{DateTime.Now.Date} ~ {DateTime.Now.Date.AddDays(1).AddSeconds(-1)}";
            devid = id;
        }
    }
}
