Actions use enum

This commit is contained in:
2025-10-16 19:13:44 +02:00
parent 53276e858b
commit 6561ba3bc3
16 changed files with 140 additions and 84 deletions

View File

@@ -1,16 +1,17 @@
using System.ComponentModel.DataAnnotations;
using API.Schema.ActionsContext.Actions;
using Microsoft.EntityFrameworkCore;
namespace API.Schema.ActionsContext;
[PrimaryKey("Key")]
public abstract class ActionRecord(string action, DateTime performedAt) : Identifiable
public abstract class ActionRecord(ActionsEnum action, DateTime performedAt) : Identifiable
{
/// <summary>
/// Constant string that describes the performed Action
/// </summary>
[StringLength(128)]
public string Action { get; init; } = action;
public ActionsEnum Action { get; init; } = action;
/// <summary>
/// UTC Time when Action was performed