Skip to content

Commit

Permalink
Merge pull request #187 from frasermolyneux/feature/b3botflag
Browse files Browse the repository at this point in the history
Feature/b3botflag
  • Loading branch information
frasermolyneux authored Jan 6, 2024
2 parents e5f54a5 + ca09493 commit 17eaeb7
Show file tree
Hide file tree
Showing 32 changed files with 859 additions and 753 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/destroy-development.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Destroy Development

on:
workflow_dispatch:
workflow_dispatch:
schedule:
- cron: "0 23 * * *"

permissions:
id-token: write # This is required for requesting the JWT
id-token: write # This is required for Az CLI Login
contents: read # This is required for actions/checkout

jobs:
Expand All @@ -18,11 +20,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: frasermolyneux/actions/terraform-destroy@main
- uses: frasermolyneux/actions/terraform-destroy-resources@main
with:
terraform-folder: "terraform"
terraform-var-file: "tfvars/dev.tfvars"
terraform-backend-file: "backends/dev.backend.hcl"
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resources: "[\"azurerm_management_lock.rg_lock\",\"azurerm_management_lock.kv_lock\",\"azurerm_linux_web_app.app\"]"
59 changes: 33 additions & 26 deletions src/data-lib/AdminAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,38 @@
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace XtremeIdiots.Portal.DataLib
namespace XtremeIdiots.Portal.DataLib;

[Index("AdminActionId", Name = "IX_AdminActionId", IsUnique = true)]
[Index("PlayerId", Name = "IX_PlayerId")]
[Index("UserProfileId", Name = "IX_UserProfileId")]
public partial class AdminAction
{
[Index("AdminActionId", Name = "IX_AdminActionId", IsUnique = true)]
[Index("PlayerId", Name = "IX_PlayerId")]
[Index("UserProfileId", Name = "IX_UserProfileId")]
public partial class AdminAction
{
[Key]
public Guid AdminActionId { get; set; }
public Guid PlayerId { get; set; }
public Guid? UserProfileId { get; set; }
public int? ForumTopicId { get; set; }
public int Type { get; set; }
[Required]
public string Text { get; set; }
[Column(TypeName = "datetime")]
public DateTime Created { get; set; }
[Column(TypeName = "datetime")]
public DateTime? Expires { get; set; }

[ForeignKey("PlayerId")]
[InverseProperty("AdminActions")]
public virtual Player Player { get; set; }
[ForeignKey("UserProfileId")]
[InverseProperty("AdminActions")]
public virtual UserProfile UserProfile { get; set; }
}
[Key]
public Guid AdminActionId { get; set; }

public Guid PlayerId { get; set; }

public Guid? UserProfileId { get; set; }

public int? ForumTopicId { get; set; }

public int Type { get; set; }

[Required]
public string Text { get; set; }

[Column(TypeName = "datetime")]
public DateTime Created { get; set; }

[Column(TypeName = "datetime")]
public DateTime? Expires { get; set; }

[ForeignKey("PlayerId")]
[InverseProperty("AdminActions")]
public virtual Player Player { get; set; }

[ForeignKey("UserProfileId")]
[InverseProperty("AdminActions")]
public virtual UserProfile UserProfile { get; set; }
}
37 changes: 20 additions & 17 deletions src/data-lib/BanFileMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,26 @@
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace XtremeIdiots.Portal.DataLib
namespace XtremeIdiots.Portal.DataLib;

[Index("BanFileMonitorId", Name = "IX_BanFileMonitorId", IsUnique = true)]
[Index("GameServerId", Name = "IX_GameServerId")]
public partial class BanFileMonitor
{
[Index("BanFileMonitorId", Name = "IX_BanFileMonitorId", IsUnique = true)]
[Index("GameServerId", Name = "IX_GameServerId")]
public partial class BanFileMonitor
{
[Key]
public Guid BanFileMonitorId { get; set; }
public Guid GameServerId { get; set; }
[Required]
public string FilePath { get; set; }
public long? RemoteFileSize { get; set; }
[Column(TypeName = "datetime")]
public DateTime? LastSync { get; set; }
[Key]
public Guid BanFileMonitorId { get; set; }

public Guid GameServerId { get; set; }

[Required]
public string FilePath { get; set; }

public long? RemoteFileSize { get; set; }

[Column(TypeName = "datetime")]
public DateTime? LastSync { get; set; }

[ForeignKey("GameServerId")]
[InverseProperty("BanFileMonitors")]
public virtual GameServer GameServer { get; set; }
}
[ForeignKey("GameServerId")]
[InverseProperty("BanFileMonitors")]
public virtual GameServer GameServer { get; set; }
}
61 changes: 34 additions & 27 deletions src/data-lib/ChatMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,39 @@
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace XtremeIdiots.Portal.DataLib
namespace XtremeIdiots.Portal.DataLib;

[Index("PlayerId", "GameServerId", Name = "IX_ChatMessages")]
[Index("GameServerId", Name = "IX_GameServerId")]
[Index("PlayerId", Name = "IX_PlayerId")]
[Index("Timestamp", Name = "IX_Timestamp")]
public partial class ChatMessage
{
[Index("PlayerId", "GameServerId", Name = "IX_ChatMessages")]
[Index("GameServerId", Name = "IX_GameServerId")]
[Index("PlayerId", Name = "IX_PlayerId")]
[Index("Timestamp", Name = "IX_Timestamp")]
public partial class ChatMessage
{
[Key]
public Guid ChatMessageId { get; set; }
public Guid GameServerId { get; set; }
public Guid PlayerId { get; set; }
[Required]
public string Username { get; set; }
public int ChatType { get; set; }
[Required]
public string Message { get; set; }
[Column(TypeName = "datetime")]
public DateTime Timestamp { get; set; }
public bool Locked { get; set; }

[ForeignKey("GameServerId")]
[InverseProperty("ChatMessages")]
public virtual GameServer GameServer { get; set; }
[ForeignKey("PlayerId")]
[InverseProperty("ChatMessages")]
public virtual Player Player { get; set; }
}
[Key]
public Guid ChatMessageId { get; set; }

public Guid GameServerId { get; set; }

public Guid PlayerId { get; set; }

[Required]
public string Username { get; set; }

public int ChatType { get; set; }

[Required]
public string Message { get; set; }

[Column(TypeName = "datetime")]
public DateTime Timestamp { get; set; }

public bool Locked { get; set; }

[ForeignKey("GameServerId")]
[InverseProperty("ChatMessages")]
public virtual GameServer GameServer { get; set; }

[ForeignKey("PlayerId")]
[InverseProperty("ChatMessages")]
public virtual Player Player { get; set; }
}
58 changes: 34 additions & 24 deletions src/data-lib/Demo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,39 @@
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace XtremeIdiots.Portal.DataLib
namespace XtremeIdiots.Portal.DataLib;

[Index("DemoId", Name = "IX_DemoId", IsUnique = true)]
[Index("UserProfileId", Name = "IX_UserProfileId")]
public partial class Demo
{
[Index("DemoId", Name = "IX_DemoId", IsUnique = true)]
[Index("UserProfileId", Name = "IX_UserProfileId")]
public partial class Demo
{
[Key]
public Guid DemoId { get; set; }
public Guid? UserProfileId { get; set; }
public int GameType { get; set; }
public string Title { get; set; }
public string FileName { get; set; }
[Column(TypeName = "datetime")]
public DateTime? Created { get; set; }
public string Map { get; set; }
public string Mod { get; set; }
public string GameMode { get; set; }
public string ServerName { get; set; }
public long FileSize { get; set; }
public string FileUri { get; set; }

[ForeignKey("UserProfileId")]
[InverseProperty("Demos")]
public virtual UserProfile UserProfile { get; set; }
}
[Key]
public Guid DemoId { get; set; }

public Guid? UserProfileId { get; set; }

public int GameType { get; set; }

public string Title { get; set; }

public string FileName { get; set; }

[Column(TypeName = "datetime")]
public DateTime? Created { get; set; }

public string Map { get; set; }

public string Mod { get; set; }

public string GameMode { get; set; }

public string ServerName { get; set; }

public long FileSize { get; set; }

public string FileUri { get; set; }

[ForeignKey("UserProfileId")]
[InverseProperty("Demos")]
public virtual UserProfile UserProfile { get; set; }
}
Loading

0 comments on commit 17eaeb7

Please sign in to comment.