feat: paste views; configuration validation; hmacsha256 method; enhance paste clean up serivce; paste view clean up service;

This commit is contained in:
2026-01-09 19:12:05 -05:00
parent 60876eb1ba
commit 3048af3a6d
20 changed files with 592 additions and 46 deletions
@@ -0,0 +1,17 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace SharpbinV3.Server.Data.Entities
{
[Index(nameof(PastePID), nameof(ViewerHash), IsUnique = true)]
public class PasteView
{
[Key]
public int Id { get; set; }
public int PastePID { get; set; }
[MaxLength(64)]
public string ViewerHash { get; set; } = null!;
public long ViewedAt { get; set; } = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
public Paste Paste { get; set; } = null!;
}
}