using System;
using System.Collections.Generic;
#if Server
namespace Server
#else
namespace UnityGame
#endif
{
public abstract class ActivityPropDataInfo
{
///
/// 活动道具类型
///
public abstract ActivityPropType PropType
{
get;
}
///
/// 获取道具名称 英文名 也是Redis中的Key
///
public abstract string[] GetPropNames();
///
/// 获取道具的过期时间
///
/// 道具名称
///
public abstract DateTime GetExpireTime(string propName);
///
/// 道具中文名称
///
public static readonly Dictionary PropName =
new Dictionary()
{
{
ActivityPropType.MenPiao,
"门票"
},
};
///
/// 获取当前周的星期天的24时
///
///
public static DateTime GetNowWeekSunDay()
{
DateTime now = DateTime.Now;
int daysUntilSunday = ((DayOfWeek.Sunday - now.DayOfWeek) + 7) % 7;
return now.Date.AddDays(daysUntilSunday + 1); //星期天的24点就是下周一的0点
}
}
public enum ActivityPropType
{
///
/// 门票
///
MenPiao = 1,
}
}