apiKey stuff

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD 2026-01-23 22:13:06 -07:00
parent 1cdfbce0fa
commit 8151747b66
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,13 @@
using CarCareTracker.Models;
namespace CarCareTracker.External.Interfaces
{
public interface IApiKeyRecordDataAccess
{
public List<APIKey> GetAPIKeyRecordsByUserId(int userId);
public APIKey GetAPIKeyById(int apiKeyId);
public APIKey GetAPIKeyByKey(string hashedKey);
public bool CreateNewAPIKey(APIKey apiKey);
public bool DeleteAPIKey(int apiKeyId);
}
}

11
Models/API/APIKey.cs Normal file
View File

@ -0,0 +1,11 @@
namespace CarCareTracker.Models
{
public class APIKey
{
public int Id { get; set; }
public int UserId { get; set; }
public string Name { get; set; }
public string Key { get; set; }
public List<HouseholdPermission> Permissions { get; set; } = new List<HouseholdPermission>();
}
}