public Entry(int year, int month, int day, float duration, IntensityLevel intensity = IntensityLevel.Medium, bool exclude = false, string notes = null) { Date = new DateTime(year, month, day); Duration = duration; Intensity = intensity; Exclude = exclude; Notes = notes; }
/// <summary> /// Constructor for easily creating entries. /// </summary> /// <param name="id">The ID for the entry.</param> /// <param name="year">The year (1 through 9999) for the entry date.</param> /// <param name="month">The month (1 through 12) for the entry month.</param> /// <param name="day">The day (1 through the number of days for the month) for the entry day.</param> /// <param name="activityType">The activity type for the entry.</param> /// <param name="duration">The duration for the entry (in minutes).</param> /// <param name="intensity">The intensity for the entry.</param> /// <param name="exclude">Whether or not the entry should be excluded when calculating the total fitness activity.</param> /// <param name="notes">The notes for the entry.</param> public Entry(int id, int year, int month, int day, Activity.ActivityType activityType, double duration, IntensityLevel intensity = IntensityLevel.Medium, bool exclude = false, string notes = null) { Id = id; Date = new DateTime(year, month, day); ActivityId = (int)activityType; Duration = duration; Intensity = intensity; Exclude = exclude; Notes = notes; }
/// <summary> /// Constructor for creating entries. /// </summary> /// <param name="user">The user for the entry.</param> /// <param name="year">The year (1 through 9999) for the entry date.</param> /// <param name="month">The month (1 through 12) for the entry month.</param> /// <param name="day">The day (1 through the number of days for the month) for the entry day.</param> /// <param name="activity">The activity for the entry.</param> /// <param name="duration">The duration for the entry (in minutes).</param> /// <param name="intensity">The intensity for the entry.</param> /// <param name="exclude">Whether or not the entry should be excluded when calculating the total fitness activity.</param> /// <param name="notes">The notes for the entry.</param> public Entry(User user, int year, int month, int day, Activity activity, decimal duration, IntensityLevel intensity = IntensityLevel.Medium, bool exclude = false, string notes = null) { UserId = user.Id; User = user; Date = new DateTime(year, month, day); Activity = activity; Duration = duration; Intensity = intensity; Exclude = exclude; Notes = notes; }