mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
this is a LOT, i should've commited in stages but oh well, from what i can remember:
- paste interactions (reactions)
- comments
- comment interactions (reactions)
- rich text editor
- move all report apis into report controller
- rename size to sizeStored
- rename trueSize to originalSize
- fixed compression on paste compression
- implemented compression threshold
- use longs instead of ints where possible in the entities
- improve record view + remove redundant check for existing view
21 lines
640 B
C#
21 lines
640 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using SharpbinV3.Server.Data.Enums;
|
|
|
|
namespace SharpbinV3.Server.Data.Entities
|
|
{
|
|
[Index(nameof(PasteID), nameof(UserUUID), IsUnique = true)]
|
|
[Index(nameof(PasteID), nameof(Type))]
|
|
public class PasteInteraction
|
|
{
|
|
[Key]
|
|
public long Id { get; set; }
|
|
public long PasteID { get; set; }
|
|
public Guid UserUUID { get; set; }
|
|
public long CreatedAt { get; set; } = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
|
public Interaction Type { get; set; }
|
|
|
|
public Paste Paste { get; set; } = null!;
|
|
}
|
|
}
|