using System.ComponentModel.DataAnnotations;

namespace MemberCenter.Web.Models.Profile;

public sealed class ProfileViewModel
{
    [Display(Name = "Last name")]
    [Required(ErrorMessage = "The {0} field is required.")]
    [StringLength(100, ErrorMessage = "The field {0} must be a string with a maximum length of {1}.")]
    public string LastName { get; set; } = string.Empty;

    [Display(Name = "First name")]
    [Required(ErrorMessage = "The {0} field is required.")]
    [StringLength(100, ErrorMessage = "The field {0} must be a string with a maximum length of {1}.")]
    public string FirstName { get; set; } = string.Empty;

    [Display(Name = "Nickname")]
    [StringLength(100, ErrorMessage = "The field {0} must be a string with a maximum length of {1}.")]
    public string? NickName { get; set; }

    [Display(Name = "Mobile phone")]
    [StringLength(50, ErrorMessage = "The field {0} must be a string with a maximum length of {1}.")]
    public string? MobilePhone { get; set; }

    [Display(Name = "Landline phone")]
    [StringLength(50, ErrorMessage = "The field {0} must be a string with a maximum length of {1}.")]
    public string? LandlinePhone { get; set; }

    [Display(Name = "Date of birth")]
    [DataType(DataType.Date)]
    public DateOnly? DateOfBirth { get; set; }

    [Display(Name = "Gender")]
    [Required(ErrorMessage = "The {0} field is required.")]
    public string Gender { get; set; } = "unspecified";

    [Display(Name = "Company name")]
    [StringLength(200, ErrorMessage = "The field {0} must be a string with a maximum length of {1}.")]
    public string? CompanyName { get; set; }

    [Display(Name = "Department")]
    [StringLength(200, ErrorMessage = "The field {0} must be a string with a maximum length of {1}.")]
    public string? Department { get; set; }

    [Display(Name = "Job title")]
    [StringLength(200, ErrorMessage = "The field {0} must be a string with a maximum length of {1}.")]
    public string? JobTitle { get; set; }

    [Display(Name = "Company phone")]
    [StringLength(50, ErrorMessage = "The field {0} must be a string with a maximum length of {1}.")]
    public string? CompanyPhone { get; set; }

    [Display(Name = "Tax ID")]
    [StringLength(32, ErrorMessage = "The field {0} must be a string with a maximum length of {1}.")]
    public string? TaxId { get; set; }

    [Display(Name = "Invoice title")]
    [StringLength(200, ErrorMessage = "The field {0} must be a string with a maximum length of {1}.")]
    public string? InvoiceTitle { get; set; }

    [Display(Name = "Remark")]
    [StringLength(1000, ErrorMessage = "The field {0} must be a string with a maximum length of {1}.")]
    public string? Remark { get; set; }

    public string Email { get; set; } = string.Empty;
    public bool EmailConfirmed { get; set; }
}
