Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TS-1501] Introduce Contract TargetType enum #79

Closed
Closed
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
2 changes: 1 addition & 1 deletion Hackney.Shared.HousingSearch/Domain/Asset/Contract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class Contract
{
public string Id { get; set; }
public string TargetId { get; set; }
public string TargetType { get; set; }
public TargetType TargetType { get; set; }
public DateTime? StartDate { get; set; }
public DateTime? ApprovalDate { get; set; }
public bool? IsApproved { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Hackney.Shared.HousingSearch/Domain/Contract/Contract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class Contract
{
public string Id { get; set; }
public string TargetId { get; set; }
public string TargetType { get; set; }
public TargetType TargetType { get; set; }
public DateTime? StartDate { get; set; }
public DateTime? ApprovalDate { get; set; }
public bool? IsApproved { get; set; }
Expand Down
14 changes: 14 additions & 0 deletions Hackney.Shared.HousingSearch/Domain/Contract/Enums.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Runtime.Serialization;
using Elasticsearch.Net;

namespace Hackney.Shared.HousingSearch.Domain.Contract
{
[Serializable]
[StringEnum]
public enum TargetType
{
[EnumMember(Value = "Asset")]
Asset
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Hackney.Shared.HousingSearch.Gateways.Models.Contract;
using Nest;
using System.Collections.Generic;
using Hackney.Shared.HousingSearch.Domain.Contract;

namespace Hackney.Shared.HousingSearch.Gateways.Models.Assets
{
Expand All @@ -10,7 +11,7 @@ public class QueryableAssetContract
[Text(Name = "id")]
public string Id { get; set; }
public string TargetId { get; set; }
public string TargetType { get; set; }
public TargetType TargetType { get; set; }
public DateTime? StartDate { get; set; }
public DateTime? ApprovalDate { get; set; }
public bool? IsApproved { get; set; }
Expand Down
Loading