using System.ComponentModel.DataAnnotations;

namespace turf_tasker.Models;

public enum LawnCareEventType
{
    Mowing,
    Watering,
    Fertilizing,
    Aeration,
    WeedControl,
    PestControl,
    DiseaseControl,
    Topdressing,
    Overseeding,
    Other
}

public enum MowingPattern
{
    [Display(Name = "N/A")]
    NotApplicable,
    Vertical,
    Horizontal,
    Diagonal,
    [Display(Name = "Opposite Diagonal")]
    OppositeDiagonal
}

public class LawnCareEvent
{
    [Key]
    public int Id { get; set; }

    [Required]
    [Display(Name = "Activity Type")]
    public LawnCareEventType EventType { get; set; }
    
    [Required]
    [DataType(DataType.Date)]
    [Display(Name = "Date")]
    public DateTime EventDate { get; set; }

    [Display(Name = "Mowing Pattern")]
    public MowingPattern? MowingPattern { get; set; }
    
    [Display(Name = "Product Used")]
    [StringLength(200)]
    public string? ProductUsed { get; set; }

    [Display(Name = "Applied Amount")]
    [Range(0.01, 1000.0, ErrorMessage = "Amount must be positive.")] // Example range
    public decimal? AppliedAmount { get; set; }

    [Display(Name = "Mower Height (inches)")]
    [Range(0.5, 6.0, ErrorMessage = "Height must be between 0.5 and 6 inches.")]
    public decimal? MowerHeightInches { get; set; }

    [Display(Name = "Problem Observed")]
    [StringLength(250)]
    public string? ProblemObserved { get; set; }

    [StringLength(500)]
    public string? Notes { get; set; }
}