using System;
using System.ComponentModel.DataAnnotations;

namespace OnlineSalesAutoCrop.CoreAPI.Models.Requests.Integrations;


public class IntegrationPaymentTermRequest
{

    [Required(ErrorMessage = "CreditCode is required.")]
    [StringLength(4, MinimumLength = 1, ErrorMessage = "CreditCode must be between 1 and 4 characters.")]
    public string CreditCode { get; set; }

    [Required(ErrorMessage = "Description is required.")]
    [StringLength(30, MinimumLength = 1, ErrorMessage = "Description must be between 1 and 30 characters.")]
    public string Description { get; set; }

    [Required(ErrorMessage = "ValidFrom is required.")]
    public DateTime ValidFrom { get; set; }

    [Required(ErrorMessage = "ValidTo is required.")]
    public DateTime ValidTo { get; set; }

    [Required(ErrorMessage = "SalesOrg is required.")]
    [StringLength(4, MinimumLength = 1, ErrorMessage = "SalesOrg must be between 1 and 4 characters.")]
    public string SalesOrg { get; set; }
}

public class GetIntegrationPaymentTermRequest
{
    [Required(ErrorMessage = "CreditCode is required.")]
    [StringLength(4, MinimumLength = 1, ErrorMessage = "CreditCode must be between 1 and 4 characters.")]
    public string CreditCode { get; set; }

    [Required(ErrorMessage = "SalesOrg is required.")]
    [StringLength(4, MinimumLength = 1, ErrorMessage = "SalesOrg must be between 1 and 4 characters.")]
    public string SalesOrg { get; set; }
}

