first commit
This commit is contained in:
10
Models/Reminder/ReminderConfig.cs
Normal file
10
Models/Reminder/ReminderConfig.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class ReminderUrgencyConfig
|
||||
{
|
||||
public int UrgentDays { get; set; } = 30;
|
||||
public int VeryUrgentDays { get; set; } = 7;
|
||||
public int UrgentDistance { get; set; } = 100;
|
||||
public int VeryUrgentDistance { get; set; } = 50;
|
||||
}
|
||||
}
|
||||
22
Models/Reminder/ReminderRecord.cs
Normal file
22
Models/Reminder/ReminderRecord.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class ReminderRecord
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int VehicleId { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public int Mileage { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Notes { get; set; }
|
||||
public bool IsRecurring { get; set; } = false;
|
||||
public bool UseCustomThresholds { get; set; } = false;
|
||||
public ReminderUrgencyConfig CustomThresholds { get; set; } = new ReminderUrgencyConfig();
|
||||
public int CustomMileageInterval { get; set; } = 0;
|
||||
public int CustomMonthInterval { get; set; } = 0;
|
||||
public ReminderIntervalUnit CustomMonthIntervalUnit { get; set; } = ReminderIntervalUnit.Months;
|
||||
public ReminderMileageInterval ReminderMileageInterval { get; set; } = ReminderMileageInterval.FiveThousandMiles;
|
||||
public ReminderMonthInterval ReminderMonthInterval { get; set; } = ReminderMonthInterval.OneYear;
|
||||
public ReminderMetric Metric { get; set; } = ReminderMetric.Date;
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
||||
44
Models/Reminder/ReminderRecordInput.cs
Normal file
44
Models/Reminder/ReminderRecordInput.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class ReminderRecordInput
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int VehicleId { get; set; }
|
||||
public string Date { get; set; } = DateTime.Now.AddDays(1).ToShortDateString();
|
||||
public int Mileage { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Notes { get; set; }
|
||||
public bool IsRecurring { get; set; } = false;
|
||||
public bool UseCustomThresholds { get; set; } = false;
|
||||
public ReminderUrgencyConfig CustomThresholds { get; set; } = new ReminderUrgencyConfig();
|
||||
public int CustomMileageInterval { get; set; } = 0;
|
||||
public int CustomMonthInterval { get; set; } = 0;
|
||||
public ReminderIntervalUnit CustomMonthIntervalUnit { get; set; } = ReminderIntervalUnit.Months;
|
||||
public ReminderMileageInterval ReminderMileageInterval { get; set; } = ReminderMileageInterval.FiveThousandMiles;
|
||||
public ReminderMonthInterval ReminderMonthInterval { get; set; } = ReminderMonthInterval.OneYear;
|
||||
public ReminderMetric Metric { get; set; } = ReminderMetric.Date;
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
public ReminderRecord ToReminderRecord()
|
||||
{
|
||||
return new ReminderRecord
|
||||
{
|
||||
Id = Id,
|
||||
VehicleId = VehicleId,
|
||||
Date = DateTime.Parse(string.IsNullOrWhiteSpace(Date) ? DateTime.Now.AddDays(1).ToShortDateString() : Date),
|
||||
Mileage = Mileage,
|
||||
Description = Description,
|
||||
Metric = Metric,
|
||||
IsRecurring = IsRecurring,
|
||||
UseCustomThresholds = UseCustomThresholds,
|
||||
CustomThresholds = CustomThresholds,
|
||||
ReminderMileageInterval = ReminderMileageInterval,
|
||||
ReminderMonthInterval = ReminderMonthInterval,
|
||||
CustomMileageInterval = CustomMileageInterval,
|
||||
CustomMonthInterval = CustomMonthInterval,
|
||||
CustomMonthIntervalUnit = CustomMonthIntervalUnit,
|
||||
Notes = Notes,
|
||||
Tags = Tags
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
28
Models/Reminder/ReminderRecordViewModel.cs
Normal file
28
Models/Reminder/ReminderRecordViewModel.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class ReminderRecordViewModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int VehicleId { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public int Mileage { get; set; }
|
||||
public int DueDays { get; set; }
|
||||
public int DueMileage { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Notes { get; set; }
|
||||
/// <summary>
|
||||
/// The metric the user selected to calculate the urgency of this reminder.
|
||||
/// </summary>
|
||||
public ReminderMetric UserMetric { get; set; } = ReminderMetric.Date;
|
||||
/// <summary>
|
||||
/// Reason why this reminder is urgent
|
||||
/// </summary>
|
||||
public ReminderMetric Metric { get; set; } = ReminderMetric.Date;
|
||||
public ReminderUrgency Urgency { get; set; } = ReminderUrgency.NotUrgent;
|
||||
/// <summary>
|
||||
/// Recurring Reminders
|
||||
/// </summary>
|
||||
public bool IsRecurring { get; set; } = false;
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user