using Hotline.Share.Dtos.Settings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XF.Domain.Dependency;

namespace Hotline.Settings.TimeLimitDomain.ExpireTimeSupplier;
public class DaySupplier : IExpireTimeSupplier, IScopeDependency
{
    public async Task<TimeResult> CalcEndTimeAsync(DateTime beginTime, TimeConfig timeConfig)
    {
        return new TimeResult { EndTime = beginTime.AddDays(timeConfig.Count), RuleStr = timeConfig.Count + "个自然日", NearlyExpiredTime = beginTime };
    }

    public async Task<TimeResult> CalcEndTimeNewAsync(DateTime beginTime, DateTime startTime, TimeConfig timeConfig)
    {
        return new TimeResult { EndTime = beginTime.AddDays(timeConfig.Count), RuleStr = timeConfig.Count + "个自然日", NearlyExpiredTime = beginTime };
    }
}
