using System.ComponentModel.DataAnnotations;

namespace PowderCoating.Application.DTOs.Customer;

public class PricingTierDto
{
    public int Id { get; set; }
    public string TierName { get; set; } = string.Empty;
    public string? Description { get; set; }
    public decimal DiscountPercent { get; set; }
    public bool IsActive { get; set; }
    public int CustomerCount { get; set; }
}

public class CreatePricingTierDto
{
    [Required(ErrorMessage = "Tier name is required")]
    [MaxLength(100)]
    [Display(Name = "Tier Name")]
    public string TierName { get; set; } = string.Empty;

    [MaxLength(500)]
    public string? Description { get; set; }

    [Required]
    [Range(0, 100, ErrorMessage = "Discount must be between 0 and 100")]
    [Display(Name = "Discount %")]
    public decimal DiscountPercent { get; set; }

    [Display(Name = "Active")]
    public bool IsActive { get; set; } = true;
}

public class UpdatePricingTierDto
{
    public int Id { get; set; }

    [Required(ErrorMessage = "Tier name is required")]
    [MaxLength(100)]
    [Display(Name = "Tier Name")]
    public string TierName { get; set; } = string.Empty;

    [MaxLength(500)]
    public string? Description { get; set; }

    [Required]
    [Range(0, 100, ErrorMessage = "Discount must be between 0 and 100")]
    [Display(Name = "Discount %")]
    public decimal DiscountPercent { get; set; }

    [Display(Name = "Active")]
    public bool IsActive { get; set; }
}
