-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from LBHackney-IT/remove-patches
Remove Asset.Patches[]
- Loading branch information
Showing
7 changed files
with
91 additions
and
116 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,61 @@ | ||
|
||
using Amazon.DynamoDBv2.DataModel; | ||
using Hackney.Shared.Asset.Domain; | ||
using Hackney.Core.DynamoDb.Converters; | ||
using System; | ||
using Hackney.Shared.PatchesAndAreas.Infrastructure; | ||
using System.Collections.Generic; | ||
|
||
namespace Hackney.Shared.Asset.Infrastructure | ||
{ | ||
[DynamoDBTable("Assets", LowerCamelCaseProperties = true)] | ||
public class AssetDb | ||
{ | ||
[DynamoDBHashKey] | ||
public Guid Id { get; set; } | ||
|
||
[DynamoDBProperty] | ||
public string AssetId { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbEnumConverter<AssetType>))] | ||
public AssetType AssetType { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbEnumConverter<RentGroup>))] | ||
public RentGroup? RentGroup { get; set; } | ||
|
||
[DynamoDBProperty] | ||
public string RootAsset { get; set; } | ||
|
||
[DynamoDBProperty] | ||
public bool IsActive { get; set; } | ||
|
||
[DynamoDBProperty] | ||
|
||
using Amazon.DynamoDBv2.DataModel; | ||
using Hackney.Shared.Asset.Domain; | ||
using Hackney.Core.DynamoDb.Converters; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Hackney.Shared.Asset.Infrastructure | ||
{ | ||
[DynamoDBTable("Assets", LowerCamelCaseProperties = true)] | ||
public class AssetDb | ||
{ | ||
[DynamoDBHashKey] | ||
public Guid Id { get; set; } | ||
|
||
[DynamoDBProperty] | ||
public string AssetId { get; set; } | ||
|
||
[DynamoDBProperty] | ||
public Guid? AreaId { get; set; } | ||
|
||
[DynamoDBProperty] | ||
public Guid? PatchId { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbEnumConverter<AssetType>))] | ||
public AssetType AssetType { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbEnumConverter<RentGroup>))] | ||
public RentGroup? RentGroup { get; set; } | ||
|
||
[DynamoDBProperty] | ||
public string RootAsset { get; set; } | ||
|
||
[DynamoDBProperty] | ||
public bool IsActive { get; set; } | ||
|
||
[DynamoDBProperty] | ||
public string ParentAssetIds { get; set; } | ||
|
||
[DynamoDBProperty] | ||
public string BoilerHouseId { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbObjectConverter<AssetLocation>))] | ||
public AssetLocation AssetLocation { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbObjectConverter<AssetAddress>))] | ||
public AssetAddress AssetAddress { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbObjectConverter<AssetManagement>))] | ||
public AssetManagement AssetManagement { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbObjectConverter<AssetCharacteristicsDb>))] | ||
public AssetCharacteristicsDb AssetCharacteristics { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbObjectConverter<AssetTenureDb>))] | ||
public AssetTenureDb Tenure { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbObjectListConverter<PatchesDb>))] | ||
public List<PatchesDb?> Patches { get; set; } | ||
|
||
[DynamoDBVersion] | ||
public int? VersionNumber { get; set; } | ||
} | ||
[DynamoDBProperty] | ||
public string BoilerHouseId { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbObjectConverter<AssetLocation>))] | ||
public AssetLocation AssetLocation { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbObjectConverter<AssetAddress>))] | ||
public AssetAddress AssetAddress { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbObjectConverter<AssetManagement>))] | ||
public AssetManagement AssetManagement { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbObjectConverter<AssetCharacteristicsDb>))] | ||
public AssetCharacteristicsDb AssetCharacteristics { get; set; } | ||
|
||
[DynamoDBProperty(Converter = typeof(DynamoDbObjectConverter<AssetTenureDb>))] | ||
public AssetTenureDb Tenure { get; set; } | ||
|
||
[DynamoDBVersion] | ||
public int? VersionNumber { get; set; } | ||
} | ||
} |