mirror of
https://github.com/C9Glax/tranga.git
synced 2025-10-17 10:50:45 +02:00
Actions use enum
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user