Systém pro správu klíčů serverů s tabulkami Server a Keys.
Id(int, PK, auto-increment)Name(string, max 100)RCONIP(string, max 50)RCONPort(int)RCONPassword(string, max 100)
Id(int, PK, auto-increment)Name(string, max 100)Description(string, max 500)Price(double)ServerId(int, FK na Servers)Sale(double, 0-1 jako procenta slevy)Image(string, cesta k obrázku)
- Entities:
Server.cs,Key.cs
- Infrastructure/Data:
SentryDbContext.cs - Services:
ServerService.cs,KeyService.cs
- Controllers:
ServersController.cs,KeysController.cs - Migrations: Database migrace
- DTOs:
ServerResponse,CreateServerDto,UpdateServerDto,KeyResponse,CreateKeyDto,UpdateKeyDto - Interfaces:
IServerService,IKeyService,ISentryApi
GET /api/servers- Získat všechny serveryGET /api/servers/{id}- Získat server podle IDPOST /api/servers- Vytvořit nový serverPUT /api/servers/{id}- Aktualizovat serverDELETE /api/servers/{id}- Smazat server
GET /api/keys- Získat všechny klíčeGET /api/keys/server/{serverId}- Získat klíče podle serveruGET /api/keys/{id}- Získat klíč podle IDPOST /api/keys- Vytvořit nový klíčPUT /api/keys/{id}- Aktualizovat klíčDELETE /api/keys/{id}- Smazat klíč
- Zkompilovat projekt:
dotnet build- Aplikovat migrace na databázi:
cd SentrySMP.Admin
dotnet ef database update --context SentryDbContext- Spustit Admin aplikaci:
cd SentrySMP.Admin
dotnet runPro pole Image v tabulce Keys doporučuji uložit cestu k souboru nebo URL. Můžeš implementovat upload endpoint pro nahrávání obrázků do složky wwwroot/images/keys/ nebo použít externí úložiště jako Azure Blob Storage.
Systém používá Basic Authentication podle existující konfigurace.