using System; using System.ComponentModel.DataAnnotations; namespace Win_in.Sfs.Scp.WebApi.Asns; /// /// Name /// 名称 /// public class N1 { /// /// Entity Identifier Code /// "SF" = Ship from /// "ST" = Ship to /// 实体标识符代码 /// [StringLength(2, MinimumLength = 2)] public string N101 { get; private set; } public string N102 { get; } = string.Empty; /// /// Identification Code Qualifier /// "92" = IACNA assigned code. /// "1" = DUNS #. /// 识别码限定符 /// [StringLength(2, MinimumLength = 1)] public string N103 { get;} = "92"; /// /// Identification Code /// 识别码代码 /// [StringLength(20, MinimumLength = 5)] public string N104 { get; set; } public string N105 { get;} public string N106 { get;} public N1(NameType type,string code) { N101 = type.ToString(); N104 = code; } public override string ToString() { return "N1" + X12Const.ElementSeparator + N101 + X12Const.ElementSeparator + N102 + X12Const.ElementSeparator + N103 + X12Const.ElementSeparator + N104; } public enum NameType { SF, ST } }