♻️ Centralized data models (wip)

This commit is contained in:
2025-09-27 14:09:28 +08:00
parent 51b6f7309e
commit e70d8371f8
206 changed files with 1352 additions and 2128 deletions

View File

@@ -0,0 +1,27 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using NodaTime;
namespace DysonNetwork.Shared.Models;
public enum PunishmentType
{
// TODO: impl the permission modification
PermissionModification,
BlockLogin,
DisableAccount,
Strike
}
public class SnAccountPunishment : ModelBase
{
public Guid Id { get; set; } = Guid.NewGuid();
[MaxLength(8192)] public string Reason { get; set; } = string.Empty;
public Instant? ExpiredAt { get; set; }
public PunishmentType Type { get; set; }
[Column(TypeName = "jsonb")] public List<string>? BlockedPermissions { get; set; }
public Guid AccountId { get; set; }
public SnAccount Account { get; set; } = null!;
}