-
-
Notifications
You must be signed in to change notification settings - Fork 20
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 #998 from pkuehnel/develop
Develop
- Loading branch information
Showing
55 changed files
with
2,132 additions
and
62 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
14 changes: 14 additions & 0 deletions
14
TeslaSolarCharger.Model/Entities/TeslaSolarCharger/TeslaToken.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,14 @@ | ||
using Microsoft.Extensions.Primitives; | ||
using TeslaSolarCharger.Model.Enums; | ||
|
||
namespace TeslaSolarCharger.Model.Entities.TeslaSolarCharger; | ||
|
||
public class TeslaToken | ||
{ | ||
public int Id { get; set; } | ||
public string AccessToken { get; set; } | ||
public string RefreshToken { get; set; } | ||
public string IdToken { get; set; } | ||
public DateTime ExpiresAtUtc { get; set; } | ||
public TeslaFleetApiRegion Region { get; set; } | ||
} |
8 changes: 8 additions & 0 deletions
8
TeslaSolarCharger.Model/Entities/TeslaSolarCharger/TscConfiguration.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,8 @@ | ||
namespace TeslaSolarCharger.Model.Entities.TeslaSolarCharger; | ||
|
||
public class TscConfiguration | ||
{ | ||
public int Id { get; set; } | ||
public string Key { get; set; } | ||
public string? Value { 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace TeslaSolarCharger.Model.Enums; | ||
|
||
public enum TeslaFleetApiRegion | ||
{ | ||
Emea, | ||
NorthAmerica, | ||
} |
208 changes: 208 additions & 0 deletions
208
TeslaSolarCharger.Model/Migrations/20231127233402_AddTeslaToken.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
TeslaSolarCharger.Model/Migrations/20231127233402_AddTeslaToken.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,39 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace TeslaSolarCharger.Model.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class AddTeslaToken : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "TeslaTokens", | ||
columns: table => new | ||
{ | ||
Id = table.Column<int>(type: "INTEGER", nullable: false) | ||
.Annotation("Sqlite:Autoincrement", true), | ||
AccessToken = table.Column<string>(type: "TEXT", nullable: false), | ||
RefreshToken = table.Column<string>(type: "TEXT", nullable: false), | ||
IdToken = table.Column<string>(type: "TEXT", nullable: false), | ||
ExpiresAtUtc = table.Column<DateTime>(type: "TEXT", nullable: false), | ||
Region = table.Column<int>(type: "INTEGER", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_TeslaTokens", x => x.Id); | ||
}); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "TeslaTokens"); | ||
} | ||
} | ||
} |
Oops, something went wrong.