25 lines
654 B
C#
25 lines
654 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Moonlight.Api.Database.Interfaces;
|
|
|
|
namespace Moonlight.Api.Database.Entities;
|
|
|
|
public class ApiKey : IActionTimestamps
|
|
{
|
|
public int Id { get; set; }
|
|
|
|
[MaxLength(30)]
|
|
public required string Name { get; set; }
|
|
|
|
[MaxLength(300)]
|
|
public required string Description { get; set; }
|
|
|
|
public string[] Permissions { get; set; } = [];
|
|
public DateTimeOffset ValidUntil { get; set; }
|
|
|
|
[MaxLength(32)]
|
|
public string Key { get; set; }
|
|
|
|
// Action timestamps
|
|
public DateTimeOffset CreatedAt { get; set; }
|
|
public DateTimeOffset UpdatedAt { get; set; }
|
|
} |