diff --git a/src/SharedNetCoreLibrary/Enums/ContactType.cs b/src/SharedNetCoreLibrary/Enums/ContactType.cs new file mode 100644 index 0000000..f037316 --- /dev/null +++ b/src/SharedNetCoreLibrary/Enums/ContactType.cs @@ -0,0 +1,10 @@ +namespace AndreasReitberger.Shared.Core.Enums +{ + public enum ContactType + { + Phone, + Mobile, + Email, + Fax, + } +} diff --git a/src/SharedNetCoreLibrary/Interfaces/IAddress.cs b/src/SharedNetCoreLibrary/Interfaces/IAddress.cs new file mode 100644 index 0000000..d3d9f6a --- /dev/null +++ b/src/SharedNetCoreLibrary/Interfaces/IAddress.cs @@ -0,0 +1,16 @@ +namespace AndreasReitberger.Shared.Core.Interfaces +{ + public interface IAddress + { + #region Properties + + public string Street { get; set; } + public string HouseNumber { get; set; } + public string ZipCode { get; set; } + public string City { get; set; } + public string State { get; set; } + public string Country { get; set; } + + #endregion + } +} diff --git a/src/SharedNetCoreLibrary/Interfaces/IContactDetail.cs b/src/SharedNetCoreLibrary/Interfaces/IContactDetail.cs new file mode 100644 index 0000000..23f7c37 --- /dev/null +++ b/src/SharedNetCoreLibrary/Interfaces/IContactDetail.cs @@ -0,0 +1,14 @@ +using AndreasReitberger.Shared.Core.Enums; + +namespace AndreasReitberger.Shared.Core.Interfaces +{ + public interface IContactDetail + { + #region Properties + + public ContactType Type { get; set; } + public string Value { get; set; } + + #endregion + } +} diff --git a/src/SharedNetCoreLibrary/Interfaces/IPerson.cs b/src/SharedNetCoreLibrary/Interfaces/IPerson.cs new file mode 100644 index 0000000..4a032e9 --- /dev/null +++ b/src/SharedNetCoreLibrary/Interfaces/IPerson.cs @@ -0,0 +1,15 @@ +namespace AndreasReitberger.Shared.Core.Interfaces +{ + public interface IPerson + { + #region Properties + + public string Salutation { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public IAddress? Address { get; set; } + public ICollection ContactDetails { get; set; } + + #endregion + } +} diff --git a/src/SharedNetCoreLibrary/Models/Address/Address.cs b/src/SharedNetCoreLibrary/Models/Address/Address.cs new file mode 100644 index 0000000..882c7d4 --- /dev/null +++ b/src/SharedNetCoreLibrary/Models/Address/Address.cs @@ -0,0 +1,28 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using AndreasReitberger.Shared.Core.Interfaces; + +namespace AndreasReitberger.Shared.Core.Models.Adress +{ + public partial class Address : ObservableObject, IAddress + { + #region Properties + [ObservableProperty] + public partial string Street { get; set; } + + [ObservableProperty] + public partial string HouseNumber { get; set; } = string.Empty; + + [ObservableProperty] + public partial string ZipCode { get; set; } = string.Empty; + + [ObservableProperty] + public partial string City { get; set; } = string.Empty; + + [ObservableProperty] + public partial string State { get; set; } = string.Empty; + + [ObservableProperty] + public partial string Country { get; set; } = string.Empty; + #endregion + } +} diff --git a/src/SharedNetCoreLibrary/Models/Person/ContactDetail.cs b/src/SharedNetCoreLibrary/Models/Person/ContactDetail.cs new file mode 100644 index 0000000..07f7a72 --- /dev/null +++ b/src/SharedNetCoreLibrary/Models/Person/ContactDetail.cs @@ -0,0 +1,18 @@ +using AndreasReitberger.Shared.Core.Enums; +using AndreasReitberger.Shared.Core.Interfaces; +using CommunityToolkit.Mvvm.ComponentModel; + +namespace AndreasReitberger.Shared.Core.Person +{ + public partial class ContactDetail : ObservableObject, IContactDetail + { + #region Properties + + [ObservableProperty] + public partial ContactType Type { get; set; } + + [ObservableProperty] + public partial string Value { get; set; } = string.Empty; + #endregion + } +} diff --git a/src/SharedNetCoreLibrary/Models/Person/Person.cs b/src/SharedNetCoreLibrary/Models/Person/Person.cs new file mode 100644 index 0000000..e58294f --- /dev/null +++ b/src/SharedNetCoreLibrary/Models/Person/Person.cs @@ -0,0 +1,25 @@ +using AndreasReitberger.Shared.Core.Interfaces; +using CommunityToolkit.Mvvm.ComponentModel; + +namespace AndreasReitberger.Shared.Core.Person +{ + public partial class Person : ObservableObject, IPerson + { + #region Properties + [ObservableProperty] + public partial string Salutation { get; set; } = string.Empty; + + [ObservableProperty] + public partial string FirstName { get; set; } = string.Empty; + + [ObservableProperty] + public partial string LastName { get; set; } = string.Empty; + + [ObservableProperty] + public partial IAddress? Address { get; set; } + + [ObservableProperty] + public partial ICollection ContactDetails { get; set; } = []; + #endregion + } +}