🐛 Bug fixes 💄 Optimizations

This commit is contained in:
2025-05-18 20:05:15 +08:00
parent 5b9b28d77a
commit cf9084b8c0
15 changed files with 7314 additions and 60 deletions

View File

@ -1,20 +1,23 @@
using System.ComponentModel.DataAnnotations;
using DysonNetwork.Sphere.Storage;
using Microsoft.EntityFrameworkCore;
namespace DysonNetwork.Sphere.Sticker;
[Index(nameof(Slug))] // The slug index shouldn't be unique, the sticker slug can be repeated across packs.
public class Sticker : ModelBase
{
public Guid Id { get; set; } = Guid.NewGuid();
[MaxLength(128)] public string Slug { get; set; } = null!;
public string ImageId { get; set; } = null!;
[MaxLength(32)] public string ImageId { get; set; } = null!;
public CloudFile Image { get; set; } = null!;
public Guid PackId { get; set; }
public StickerPack Pack { get; set; } = null!;
}
[Index(nameof(Prefix), IsUnique = true)]
public class StickerPack : ModelBase
{
public Guid Id { get; set; } = Guid.NewGuid();