member_center/src/MemberCenter.Web/Models/Profile/AddressFormViewModel.cs
2026-07-10 23:03:25 +09:00

51 lines
1.1 KiB
C#

using System.ComponentModel.DataAnnotations;
namespace MemberCenter.Web.Models.Profile;
public sealed class AddressFormViewModel
{
public Guid? Id { get; set; }
[Required]
[StringLength(100)]
public string Label { get; set; } = "home";
[Required]
[StringLength(100)]
public string RecipientName { get; set; } = string.Empty;
[Required]
[StringLength(50)]
public string RecipientPhone { get; set; } = string.Empty;
[Required]
[StringLength(2, MinimumLength = 2)]
public string CountryCode { get; set; } = "TW";
[StringLength(20)]
public string? PostalCode { get; set; }
[StringLength(100)]
public string? StateRegion { get; set; }
[StringLength(100)]
public string? City { get; set; }
[StringLength(100)]
public string? District { get; set; }
[Required]
[StringLength(255)]
public string AddressLine1 { get; set; } = string.Empty;
[StringLength(255)]
public string? AddressLine2 { get; set; }
[StringLength(200)]
public string? CompanyName { get; set; }
public bool IsDefault { get; set; }
public string? AddressMetaJson { get; set; }
}