Initial commit
This commit is contained in:
		
							parent
							
								
									a1482b3e16
								
							
						
					
					
						commit
						dd9f5363c7
					
				
							
								
								
									
										11
									
								
								Contacts.Types.Model/Addresses/IAddress.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								Contacts.Types.Model/Addresses/IAddress.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					using Connected.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Contacts.Types.Addresses;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public interface IAddress : IPrimaryKey<int>
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						int PostalCode { get; init; }
 | 
				
			||||||
 | 
						string Street { get; init; }
 | 
				
			||||||
 | 
						string Number { get; init; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										14
									
								
								Contacts.Types.Model/Contacts.Types.Model.csproj
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								Contacts.Types.Model/Contacts.Types.Model.csproj
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					<Project Sdk="Microsoft.NET.Sdk">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <PropertyGroup>
 | 
				
			||||||
 | 
					    <TargetFramework>net7.0</TargetFramework>
 | 
				
			||||||
 | 
					    <ImplicitUsings>enable</ImplicitUsings>
 | 
				
			||||||
 | 
					    <Nullable>enable</Nullable>
 | 
				
			||||||
 | 
					    <RootNamespace>Contacts.Types</RootNamespace>
 | 
				
			||||||
 | 
					  </PropertyGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <ProjectReference Include="..\..\Common.Types\Common.Types.Model\Common.Types.Model.csproj" />
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</Project>
 | 
				
			||||||
							
								
								
									
										5
									
								
								Contacts.Types.Model/ContactsUrls.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								Contacts.Types.Model/ContactsUrls.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					namespace Contacts.Types;
 | 
				
			||||||
 | 
					public static class ContactsUrls
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						public const string BusinessPartners = "/contacts/businessPartners";
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										28
									
								
								Contacts.Types.Model/IBusinessPartner.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								Contacts.Types.Model/IBusinessPartner.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,28 @@
 | 
				
			|||||||
 | 
					using Connected.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Contacts.Types;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Flags]
 | 
				
			||||||
 | 
					public enum CustomerRoles
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						None = 0,
 | 
				
			||||||
 | 
						Supplier = 1,
 | 
				
			||||||
 | 
						Customer = 2
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					/// <summary>
 | 
				
			||||||
 | 
					/// An entity which represents a business partner.
 | 
				
			||||||
 | 
					/// </summary>
 | 
				
			||||||
 | 
					/// <remarks>
 | 
				
			||||||
 | 
					/// A business partner can be an <see cref="IContact"/>
 | 
				
			||||||
 | 
					/// or an <see cref="IOrganization"/>. An <see cref="IContact"/> is tipically a person
 | 
				
			||||||
 | 
					/// which buys products and/or services. An <see cref="IOrganization"/> is a business
 | 
				
			||||||
 | 
					/// entity which can be <see cref="CustomerRoles.Supplier"/>, <see cref="CustomerRoles.Customer"/>
 | 
				
			||||||
 | 
					/// or both.
 | 
				
			||||||
 | 
					/// </remarks>
 | 
				
			||||||
 | 
					public interface IBusinessPartner : IPrimaryKey<int>
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						int? Organization { get; init; }
 | 
				
			||||||
 | 
						int? Contact { get; init; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						CustomerRoles Roles { get; init; }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										12
									
								
								Contacts.Types.Model/IBusinessPartnerService.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								Contacts.Types.Model/IBusinessPartnerService.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,12 @@
 | 
				
			|||||||
 | 
					using Connected.Annotations;
 | 
				
			||||||
 | 
					using Connected.Notifications;
 | 
				
			||||||
 | 
					using Connected.ServiceModel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Contacts.Types;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					[ServiceUrl(ContactsUrls.BusinessPartners)]
 | 
				
			||||||
 | 
					public interface IBusinessPartnerService : IServiceNotifications<int>
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						Task<IBusinessPartner?> Select(PrimaryKeyArgs<int> args);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										13
									
								
								Contacts.Types.Model/IContact.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								Contacts.Types.Model/IContact.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
				
			|||||||
 | 
					using Connected.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Contacts.Types;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public interface IContact : IPrimaryKey<int>
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						string? FirstName { get; init; }
 | 
				
			||||||
 | 
						string? MiddleName { get; init; }
 | 
				
			||||||
 | 
						string? LastName { get; init; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						string? Phone { get; init; }
 | 
				
			||||||
 | 
						string? Email { get; init; }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										10
									
								
								Contacts.Types.Model/Organizations/IOrganization.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Contacts.Types.Model/Organizations/IOrganization.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					using Connected.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Contacts.Types.Organizations;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public interface IOrganization : IPrimaryKey<int>
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						string Name { get; init; }
 | 
				
			||||||
 | 
						int PrimaryAddress { get; init; }
 | 
				
			||||||
 | 
						int BillingAddress { get; init; }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					using Connected.Data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Contacts.Types.Organizations;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public interface IOrganizationContact : IPrimaryKey<int>
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						int Organization { get; init; }
 | 
				
			||||||
 | 
						int Contact { get; init; }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										9
									
								
								Contacts.Types/Bootstrapper.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								Contacts.Types/Bootstrapper.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					using Connected;
 | 
				
			||||||
 | 
					using Connected.Annotations;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[assembly: MicroService(MicroServiceType.Service)]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Contacts.Types;
 | 
				
			||||||
 | 
					internal sealed class Bootstrapper : Startup
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										15
									
								
								Contacts.Types/BusinessPartnerService.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								Contacts.Types/BusinessPartnerService.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					using Connected.ServiceModel;
 | 
				
			||||||
 | 
					using Connected.Services;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Contacts.Types;
 | 
				
			||||||
 | 
					internal sealed class BusinessPartnerService : EntityService<int>, IBusinessPartnerService
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						public BusinessPartnerService(IContext context) : base(context)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public Task<IBusinessPartner?> Select(PrimaryKeyArgs<int> args)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							throw new NotImplementedException();
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										15
									
								
								Contacts.Types/Contacts.Types.csproj
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								Contacts.Types/Contacts.Types.csproj
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					<Project Sdk="Microsoft.NET.Sdk">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <PropertyGroup>
 | 
				
			||||||
 | 
					    <TargetFramework>net7.0</TargetFramework>
 | 
				
			||||||
 | 
					    <ImplicitUsings>enable</ImplicitUsings>
 | 
				
			||||||
 | 
					    <Nullable>enable</Nullable>
 | 
				
			||||||
 | 
					  </PropertyGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <ProjectReference Include="..\..\Framework\Connected.Entities\Connected.Entities.csproj" />
 | 
				
			||||||
 | 
					    <ProjectReference Include="..\..\Framework\Connected.Services\Connected.Services.csproj" />
 | 
				
			||||||
 | 
					    <ProjectReference Include="..\Contacts.Types.Model\Contacts.Types.Model.csproj" />
 | 
				
			||||||
 | 
					  </ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</Project>
 | 
				
			||||||
							
								
								
									
										56
									
								
								Customers.sln
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								Customers.sln
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,56 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					Microsoft Visual Studio Solution File, Format Version 12.00
 | 
				
			||||||
 | 
					# Visual Studio Version 17
 | 
				
			||||||
 | 
					VisualStudioVersion = 17.4.33020.496
 | 
				
			||||||
 | 
					MinimumVisualStudioVersion = 10.0.40219.1
 | 
				
			||||||
 | 
					Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{AE326167-90A7-4D49-BB24-BA7DEE6A2F26}"
 | 
				
			||||||
 | 
					EndProject
 | 
				
			||||||
 | 
					Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Types.Model", "..\Common.Types\Common.Types.Model\Common.Types.Model.csproj", "{3839CE71-C1DD-467E-B1E4-8D00C3460CC5}"
 | 
				
			||||||
 | 
					EndProject
 | 
				
			||||||
 | 
					Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Contacts.Types.Model", "Contacts.Types.Model\Contacts.Types.Model.csproj", "{AA722E99-87C8-4D8F-ACB5-2F2D07669BC6}"
 | 
				
			||||||
 | 
					EndProject
 | 
				
			||||||
 | 
					Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Contacts.Types", "Contacts.Types\Contacts.Types.csproj", "{D465F1C6-42CE-445A-9CCE-5DD6D8A30055}"
 | 
				
			||||||
 | 
					EndProject
 | 
				
			||||||
 | 
					Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Connected.Entities", "..\Framework\Connected.Entities\Connected.Entities.csproj", "{31825097-E9A6-4643-9118-BE007ABEA405}"
 | 
				
			||||||
 | 
					EndProject
 | 
				
			||||||
 | 
					Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Connected.Services", "..\Framework\Connected.Services\Connected.Services.csproj", "{F254B9EC-9F32-4304-8855-17DCA60C5EC5}"
 | 
				
			||||||
 | 
					EndProject
 | 
				
			||||||
 | 
					Global
 | 
				
			||||||
 | 
						GlobalSection(SolutionConfigurationPlatforms) = preSolution
 | 
				
			||||||
 | 
							Debug|Any CPU = Debug|Any CPU
 | 
				
			||||||
 | 
							Release|Any CPU = Release|Any CPU
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
						GlobalSection(ProjectConfigurationPlatforms) = postSolution
 | 
				
			||||||
 | 
							{3839CE71-C1DD-467E-B1E4-8D00C3460CC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 | 
				
			||||||
 | 
							{3839CE71-C1DD-467E-B1E4-8D00C3460CC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
 | 
				
			||||||
 | 
							{3839CE71-C1DD-467E-B1E4-8D00C3460CC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
				
			||||||
 | 
							{3839CE71-C1DD-467E-B1E4-8D00C3460CC5}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
				
			||||||
 | 
							{AA722E99-87C8-4D8F-ACB5-2F2D07669BC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 | 
				
			||||||
 | 
							{AA722E99-87C8-4D8F-ACB5-2F2D07669BC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
 | 
				
			||||||
 | 
							{AA722E99-87C8-4D8F-ACB5-2F2D07669BC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
				
			||||||
 | 
							{AA722E99-87C8-4D8F-ACB5-2F2D07669BC6}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
				
			||||||
 | 
							{D465F1C6-42CE-445A-9CCE-5DD6D8A30055}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 | 
				
			||||||
 | 
							{D465F1C6-42CE-445A-9CCE-5DD6D8A30055}.Debug|Any CPU.Build.0 = Debug|Any CPU
 | 
				
			||||||
 | 
							{D465F1C6-42CE-445A-9CCE-5DD6D8A30055}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
				
			||||||
 | 
							{D465F1C6-42CE-445A-9CCE-5DD6D8A30055}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
				
			||||||
 | 
							{31825097-E9A6-4643-9118-BE007ABEA405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 | 
				
			||||||
 | 
							{31825097-E9A6-4643-9118-BE007ABEA405}.Debug|Any CPU.Build.0 = Debug|Any CPU
 | 
				
			||||||
 | 
							{31825097-E9A6-4643-9118-BE007ABEA405}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
				
			||||||
 | 
							{31825097-E9A6-4643-9118-BE007ABEA405}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
				
			||||||
 | 
							{F254B9EC-9F32-4304-8855-17DCA60C5EC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 | 
				
			||||||
 | 
							{F254B9EC-9F32-4304-8855-17DCA60C5EC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
 | 
				
			||||||
 | 
							{F254B9EC-9F32-4304-8855-17DCA60C5EC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
				
			||||||
 | 
							{F254B9EC-9F32-4304-8855-17DCA60C5EC5}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
						GlobalSection(SolutionProperties) = preSolution
 | 
				
			||||||
 | 
							HideSolutionNode = FALSE
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
						GlobalSection(NestedProjects) = preSolution
 | 
				
			||||||
 | 
							{3839CE71-C1DD-467E-B1E4-8D00C3460CC5} = {AE326167-90A7-4D49-BB24-BA7DEE6A2F26}
 | 
				
			||||||
 | 
							{31825097-E9A6-4643-9118-BE007ABEA405} = {AE326167-90A7-4D49-BB24-BA7DEE6A2F26}
 | 
				
			||||||
 | 
							{F254B9EC-9F32-4304-8855-17DCA60C5EC5} = {AE326167-90A7-4D49-BB24-BA7DEE6A2F26}
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
						GlobalSection(ExtensibilityGlobals) = postSolution
 | 
				
			||||||
 | 
							SolutionGuid = {89478694-8DAA-4C4E-8047-8B516C5E26AE}
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
					EndGlobal
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user