add supplier attributes

This commit is contained in:
2023-06-12 13:13:40 +02:00
parent 9cb007399a
commit 73bfcccc9c
15 changed files with 218 additions and 46 deletions

View File

@@ -0,0 +1,19 @@
using System.Runtime.Serialization;
namespace AB.Contracts
{
public enum CommunicationType
{
[EnumMember(Value = "Email")]
Email,
[EnumMember(Value = "Postal")]
Postal,
[EnumMember(Value = "Phone")]
Phone,
[EnumMember(Value = "Fax")]
Fax
}
}

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AB.Contracts;
namespace AB.Contracts;
public class ContactPersonDto
{
@@ -17,5 +11,6 @@ public class ContactPersonDto
public string Email { get; set; }
public string Notes { get; set; }
}

View File

@@ -1,24 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace AB.Contracts
{
public enum PreferredCommunicationType
{
[EnumMember(Value = "Email")]
Email,
[EnumMember(Value = "Postal")]
Postal,
[EnumMember(Value = "Phone")]
Phone,
[EnumMember(Value = "Phone")]
Fax
}
}

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;
namespace AB.Contracts;
@@ -11,4 +7,21 @@ public class SupplierDto
public Guid Id { get; set; }
public string Salutation { get; set; }
public string Name1 { get; set; }
public string Name2 { get; set; }
public string Email { get; set; }
public string PhoneNumber { get; set; }
public string TaxId { get; set; }
[DataMember(Name = "PreferredCommunication", EmitDefaultValue = true)]
public CommunicationType PreferredCommunication { get; set; }
public IEnumerable<ContactPersonDto> ContactPersons { get; set; }
}

View File

@@ -18,7 +18,7 @@ public class SupplierForCreationDto
public string TaxId { get; set; }
[DataMember(Name = "PreferredCommunication", EmitDefaultValue = true)]
public PreferredCommunicationType PreferredCommunication { get; set; }
public CommunicationType PreferredCommunication { get; set; }
public IEnumerable<ContactPersonDto> ContactPersons { get; set; }