Skip to content
This repository was archived by the owner on Oct 8, 2023. It is now read-only.

Commit 831fffb

Browse files
authored
Merge pull request #35 from Microsoft/feature/resource-id-to-string
Feature/resource id to string: Update all outward facing resources to use string Ids for ease of integration with other systems. Auto-generate string Ids if not specified Update frontend to be compatible with string Ids Fix minor frontend bugs Add ability to delete assets and devices from the frontend
2 parents dcfcfe6 + f341fb0 commit 831fffb

File tree

117 files changed

+1152
-651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+1152
-651
lines changed

Backend/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,5 @@ __pycache__/
282282
PublishProfiles/
283283
src/Trackable.Web/wwwroot/dist/**
284284
!src/Trackable.Web/wwwroot/dist/swagger/
285+
!src/Trackable.Web/wwwroot/dist/swagger/swagger.css
285286
!src/Trackable.Web/wwwroot/dist/swagger/swagger.js

Backend/src/Trackable.EntityFramework/AssetData.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
namespace Trackable.EntityFramework
99
{
1010
[Table("Assets")]
11-
public class AssetData : EntityBase<string>, ITaggedEntity
11+
public class AssetData : EntityBase<string>, ITaggedEntity, INamedEntity
1212
{
13+
public string Name { get; set; }
14+
1315
public TrackingDeviceData TrackingDevice { get; set; }
1416

1517
public ICollection<GeoFenceUpdateData> NotificationHistory { get; set; }

Backend/src/Trackable.EntityFramework/AssetPropertiesData.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
using System;
5-
using System.Collections.Generic;
64
using System.ComponentModel.DataAnnotations.Schema;
7-
using System.Linq;
8-
using System.Text;
9-
using System.Threading.Tasks;
105

116
namespace Trackable.EntityFramework
127
{

Backend/src/Trackable.EntityFramework/ConfigurationData.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
using System;
5-
using System.Collections.Generic;
6-
using System.ComponentModel.DataAnnotations;
74
using System.ComponentModel.DataAnnotations.Schema;
8-
using System.Data.Entity.Spatial;
95

106
namespace Trackable.EntityFramework
117
{

Backend/src/Trackable.EntityFramework/DeploymentIdData.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Licensed under the MIT License.
33

44
using System;
5-
using System.Collections.Generic;
6-
using System.ComponentModel.DataAnnotations;
75
using System.ComponentModel.DataAnnotations.Schema;
86

97
namespace Trackable.EntityFramework

Backend/src/Trackable.EntityFramework/EntityFrameworkExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4+
using Microsoft.AspNetCore.Builder;
5+
using Microsoft.Extensions.DependencyInjection;
46
using System.Data.Entity.Infrastructure;
57
using System.Data.Entity.Migrations;
68
using System.IO;
7-
using Microsoft.AspNetCore.Builder;
8-
using Microsoft.Extensions.DependencyInjection;
99

1010
namespace Trackable.EntityFramework
1111
{

Backend/src/Trackable.EntityFramework/GeoFenceData.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
using System;
54
using System.Collections.Generic;
65
using System.ComponentModel.DataAnnotations;
76
using System.ComponentModel.DataAnnotations.Schema;
@@ -10,7 +9,7 @@
109
namespace Trackable.EntityFramework
1110
{
1211
[Table("GeoFences")]
13-
public class GeoFenceData : EntityBase<int>, ITaggedEntity, INamedEntity
12+
public class GeoFenceData : EntityBase<string>, ITaggedEntity, INamedEntity
1413
{
1514
[Required]
1615
public string Name { get; set; }

Backend/src/Trackable.EntityFramework/GeoFenceUpdateData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class GeoFenceUpdateData : EntityBase<int>
1212
[Required]
1313
[Index("IX_GeoFenceDataId")]
1414
[Index("GeoFenceAssetUnique", IsUnique = true, Order = 0)]
15-
public int GeoFenceDataId { get; set; }
15+
public string GeoFenceDataId { get; set; }
1616

1717
[Required]
1818
[Index("IX_AssetDataId")]

Backend/src/Trackable.EntityFramework/LocationData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace Trackable.EntityFramework
99
{
1010
[Table("Locations")]
11-
public class LocationData : EntityBase<int>, ITaggedEntity, INamedEntity
11+
public class LocationData : EntityBase<string>, ITaggedEntity, INamedEntity
1212
{
1313
public string Name { get; set; }
1414

Backend/src/Trackable.EntityFramework/Migrations/201803071221497_ResourceIdToString.Designer.cs

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)