using System;

#if Server
namespace Server
#else
namespace UnityGame
#endif
{
    public class ActivityPropData_MenPiao : ActivityPropDataInfo
    {
        /// <summary>
        /// 获取道具名称   保质期是两周
        /// </summary>
        /// <returns></returns>
        public override string[] GetPropNames()
        {
            return new string[]
            {
                //本周过期
                GetNowWeekSunDay().ToString("yyyyMMdd"),
                //下周过期
                GetNowWeekSunDay().AddDays(7).ToString("yyyyMMdd")
            };
        }

        public override ActivityPropType PropType
        {
            get
            {
                return ActivityPropType.MenPiao;
            }
        }

        public override DateTime GetExpireTime(string propName)
        {
            if (DateTime.TryParseExact(propName, "yyyyMMdd", null, System.Globalization.DateTimeStyles.None,
                    out DateTime time))
            {
                return time;
            }
            else
            {
                return DateTime.Now;
            }
        }

    }
}