Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
179 additions
and
8 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
57 changes: 57 additions & 0 deletions
57
Tests/OpenNETCF.ORM.SqlServer.Integration.Test/Entities/PublishedEntityBase.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,57 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace OpenNETCF.ORM.SqlServer.Integration.Test.Entities | ||
{ | ||
public abstract class PublishedEntityBase | ||
{ | ||
public PublishedEntityBase() | ||
{ | ||
} | ||
|
||
public PublishedEntityBase(Guid publishID, int clientID, int portfolioID, int engineID) | ||
{ | ||
if (publishID == Guid.Empty) | ||
{ | ||
this.PublishID = Guid.NewGuid(); | ||
} | ||
else | ||
{ | ||
this.PublishID = publishID; | ||
} | ||
|
||
RecordDateUtc = DateTime.Now.ToUniversalTime(); | ||
|
||
this.EngineID = engineID; | ||
this.ClientID = clientID; | ||
this.PortfolioID = portfolioID; | ||
} | ||
|
||
[Field(IsPrimaryKey = true)] | ||
public Guid PublishID { get; set; } | ||
|
||
[Field] | ||
public int EngineID { get; set; } | ||
|
||
/// <summary> | ||
/// Time recorded at the building | ||
/// </summary> | ||
[Field(SearchOrder = FieldSearchOrder.Descending)] | ||
public DateTime RecordDateUtc { get; set; } | ||
|
||
/// <summary> | ||
/// Time it was stored at the server | ||
/// </summary> | ||
[Field] | ||
public DateTime StoredDateUtc { get; set; } | ||
|
||
[Field(SearchOrder = FieldSearchOrder.Ascending)] | ||
public int ClientID { get; set; } | ||
|
||
[Field(SearchOrder = FieldSearchOrder.Ascending)] | ||
public int PortfolioID { get; set; } | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
Tests/OpenNETCF.ORM.SqlServer.Integration.Test/Entities/PublishedTenantApartmentState.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,61 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace OpenNETCF.ORM.SqlServer.Integration.Test.Entities | ||
{ | ||
public enum HVACControlState | ||
{ | ||
Heating, | ||
Cooling | ||
} | ||
|
||
[Entity(KeyScheme = KeyScheme.GUID)] | ||
public class PublishedTenantApartmentState : PublishedEntityBase | ||
{ | ||
public PublishedTenantApartmentState() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Foreign-key to the PublishedTenenantBuildingState | ||
/// </summary> | ||
[Field] | ||
public Guid PublishedBuildingStateID { get; set; } | ||
|
||
[Field] | ||
public string ApartmentName { get; set; } | ||
|
||
/// <summary> | ||
/// Last time the apartment thermostat was contacted | ||
/// </summary> | ||
[Field] | ||
public DateTime LastContact { get; set; } | ||
|
||
[Field] | ||
public HVACControlState ControlState { get; set; } | ||
|
||
[Field] | ||
public bool Occupied { get; set; } | ||
|
||
[Field] | ||
public double SpaceTemperature { get; set; } | ||
|
||
[Field] | ||
public double? SupplyTemperature { get; set; } | ||
|
||
[Field] | ||
public double? ReturnTemperature { get; set; } | ||
|
||
[Field] | ||
public double SetPoint { get; set; } | ||
|
||
[Field] | ||
public double HeatDeadband { get; set; } | ||
|
||
[Field] | ||
public double CoolDeadband { get; set; } | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
Tests/OpenNETCF.ORM.SqlServer.Integration.Test/Entities/PublishedTenantBuildingState.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,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace OpenNETCF.ORM.SqlServer.Integration.Test.Entities | ||
{ | ||
[Entity(KeyScheme = KeyScheme.GUID)] | ||
public class PublishedTenantBuildingState : PublishedEntityBase | ||
{ | ||
public PublishedTenantBuildingState() | ||
{ | ||
} | ||
|
||
[Field] | ||
public double OutsideTemperature { get; set; } | ||
[Field] | ||
public double UnoccupiedSetPoint { get; set; } | ||
[Field] | ||
public double UnoccupiedHeatDeadband { get; set; } | ||
[Field] | ||
public double UnoccupiedCoolDeadband { 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
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