feat(roles, visibility): refactor user roles to use flags and introduce visibility enum

This commit is contained in:
2026-03-10 03:21:13 -04:00
parent 0564d55396
commit 44d7ae8cd3
31 changed files with 732 additions and 175 deletions
@@ -1,3 +1,4 @@
using SharpbinV3.Server.Data.Enums;
using SharpbinV3.Server.DTOs.User;
namespace SharpbinV3.Server.DTOs.Paste
@@ -13,7 +14,7 @@ namespace SharpbinV3.Server.DTOs.Paste
public long TrueSize { get; set; }
public bool IsCompressed { get; set; }
public int Views { get; set; }
public int Visibility { get; set; }
public Visibility Visibility { get; set; }
public long? EditedAt { get; set; }
public long ExpiresAt { get; set; }
public int? ReportCount { get; set; }
@@ -29,6 +30,7 @@ namespace SharpbinV3.Server.DTOs.Paste
public long Size { get; set; }
public long TrueSize { get; set; }
public long ExpiresAt { get; set; }
public Visibility Visibility { get; set;}
}
public class PasteOptionsDto
@@ -1,10 +1,12 @@
namespace SharpbinV3.Server.DTOs.Paste
using SharpbinV3.Server.Data.Enums;
namespace SharpbinV3.Server.DTOs.Paste
{
public class UpdatePasteDto
{
public string? Title { get; set; }
public string? Syntax { get; set; }
public int? Visibility { get; set; }
public Visibility? Visibility { get; set; }
public long? ExpiresAt { get; set; }
}
}