-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add District entity and update GeocoderController
to include District information
- Loading branch information
1 parent
a9fed73
commit 0eff893
Showing
2 changed files
with
46 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using FunderMaps.Core.DataAnnotations; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace FunderMaps.Core.Entities; | ||
|
||
/// <summary> | ||
/// District entity. | ||
/// </summary> | ||
public sealed class District : IEntityIdentifier<string> | ||
{ | ||
/// <summary> | ||
/// Entity identifier. | ||
/// </summary> | ||
public string Identifier => Id; | ||
|
||
/// <summary> | ||
/// Unique identifier. | ||
/// </summary> | ||
[Required, Geocoder] | ||
public string Id { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// District name. | ||
/// </summary> | ||
[Required] | ||
public string Name { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// Is water district. | ||
/// </summary> | ||
public bool Water { get; set; } | ||
|
||
/// <summary> | ||
/// External data source id. | ||
/// </summary> | ||
[Required] | ||
public string ExternalId { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// Municipality identifier. | ||
/// </summary> | ||
[Geocoder] | ||
public string? MunicipalityId { get; set; } | ||
} |
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