-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: or-1394 add legal entity type field
- Loading branch information
Showing
12 changed files
with
145 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/OrganisationRegistry.ElasticSearch/Organisations/OrganisationDocument.LegalEntityType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
namespace OrganisationRegistry.ElasticSearch.Organisations; | ||
|
||
using Osc; | ||
|
||
public class LegalEntityType | ||
{ | ||
public LegalEntityType(string code, string description) | ||
{ | ||
Code = code; | ||
Description = description; | ||
} | ||
|
||
public LegalEntityType() | ||
{ | ||
Code = string.Empty; | ||
Description = string.Empty; | ||
} | ||
|
||
public string Code { get; set; } | ||
public string Description { get; set; } | ||
|
||
public static IPromise<IProperties> Mapping(PropertiesDescriptor<LegalEntityType> map) | ||
=> map | ||
.Keyword( | ||
k => k | ||
.Name(p => p.Code)).Keyword( | ||
k => k | ||
.Name(p => p.Description)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/OrganisationRegistry/Organisation/Events/KboLegalEntityTypeAdded.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace OrganisationRegistry.Organisation.Events; | ||
|
||
using System; | ||
using Infrastructure; | ||
using Newtonsoft.Json; | ||
|
||
public class KboLegalEntityTypeAdded : BaseEvent<KboLegalEntityTypeAdded> | ||
{ | ||
public KboLegalEntityTypeAdded(Guid organisationId, string legalEntityTypeCode, string legalEntityTypeDescription) | ||
{ | ||
Id = organisationId; | ||
LegalEntityTypeCode = legalEntityTypeCode; | ||
LegalEntityTypeDescription = legalEntityTypeDescription; | ||
} | ||
|
||
public Guid OrganisationId => Id; | ||
|
||
public string LegalEntityTypeCode { get; } | ||
public string LegalEntityTypeDescription { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters