using LitJson;

public class UserMission : HeaderData
{
	public int id;

	public int mission_id;

	public int mission_status;

	public int total_count;

	public string mission_title;

	public string mission_name;

	public int display_order;

	public int require_number;

	public string reward_name;

	public int reward_type;

	public int reward_number;

	public string reward_detail;

	public long start_time;

	public long end_time;

	public string achieved_message;

	public string create_time;

	public string update_time;

	public string delete_time;

	public string affected_rows;

	public bool default_flag;

	public int lot_type;

	public const int GEM_MISSION_TYPE = 6;

	public long RewardUserGoodsId { get; set; }

	public static UserMission CreateAchievedMission(JsonData data)
	{
		return new UserMission
		{
			achieved_message = data["achieved_message"].ToString()
		};
	}

	public long GetMissionPeriodSec(long nowUnixTime)
	{
		long num = end_time - nowUnixTime;
		if (num < 0)
		{
			num = 0L;
		}
		return num;
	}

	public bool IsGemMission()
	{
		return lot_type == 6;
	}
}
