using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;

namespace OnlineSalesAutoCrop.CoreAPI.Models.Requests
{
	public class BaseRequest
	{
		[Required, NotNull, StringLength(20, MinimumLength = 1, ErrorMessage = "Code must be between 1 to 20 characters.")]
		public string Code { get; set; }

		[Required, NotNull, StringLength(100, MinimumLength = 1, ErrorMessage = "Name must be between 1 to 100 characters.")]
		public string Name { get; set; }

		[Required, NotNull, Range(minimum: 1, maximum: 16, ErrorMessage = "Status must be between 1 and 16")]
		public EnumStatus Status { get; set; }

		[Required, NotNull, Range(minimum: 0, maximum: 999999, ErrorMessage = "Seq Id must be between 0 and 999999")]
		public int SeqId { get; set; }
	}

	public class NoContentRequest
	{
		public int NoParameter { get; set; }
	}

	public class LoginRemarksRequest
	{
		public string AuthenticationId { get; set; }
	}

    public abstract class PagedRequest
    {
        [Range(1, int.MaxValue, ErrorMessage = "PageNumber must be at least 1.")]
        public int PageNumber { get; set; } = 1;

        [Range(1, 1000, ErrorMessage = "PageSize must be between 1 and 1000.")]
        public int PageSize { get; set; } = 1000;
    }
}
