Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/SharedNetCoreLibrary/Enums/ContactType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace AndreasReitberger.Shared.Core.Enums
{
public enum ContactType
{
Phone,
Mobile,
Email,
Fax,
}
}
16 changes: 16 additions & 0 deletions src/SharedNetCoreLibrary/Interfaces/IAddress.cs
Original file line number Diff line number Diff line change
@@ -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
}
}
14 changes: 14 additions & 0 deletions src/SharedNetCoreLibrary/Interfaces/IContactDetail.cs
Original file line number Diff line number Diff line change
@@ -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
}
}
15 changes: 15 additions & 0 deletions src/SharedNetCoreLibrary/Interfaces/IPerson.cs
Original file line number Diff line number Diff line change
@@ -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<IContactDetail> ContactDetails { get; set; }

#endregion
}
}
28 changes: 28 additions & 0 deletions src/SharedNetCoreLibrary/Models/Address/Address.cs
Original file line number Diff line number Diff line change
@@ -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
}
}
18 changes: 18 additions & 0 deletions src/SharedNetCoreLibrary/Models/Person/ContactDetail.cs
Original file line number Diff line number Diff line change
@@ -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
}
}
25 changes: 25 additions & 0 deletions src/SharedNetCoreLibrary/Models/Person/Person.cs
Original file line number Diff line number Diff line change
@@ -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<IContactDetail> ContactDetails { get; set; } = [];
#endregion
}
}
Loading