2023-06-01 00:03:23 -04:00
|
|
|
namespace vassago.Models;
|
|
|
|
|
|
|
|
using System;
|
2023-06-05 14:55:48 -04:00
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
2023-06-01 00:03:23 -04:00
|
|
|
public class PermissionSettings
|
|
|
|
{
|
2023-06-05 14:55:48 -04:00
|
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
2023-06-01 00:03:23 -04:00
|
|
|
public int Id { get; set; }
|
2023-06-28 00:14:32 -04:00
|
|
|
public ulong? MaxAttachmentBytes { get; set; }
|
2023-06-01 00:03:23 -04:00
|
|
|
public uint? MaxTextChars { get; set; }
|
|
|
|
public bool? LinksAllowed { get; set; }
|
2023-06-19 11:03:06 -04:00
|
|
|
public bool? ReactionsPossible { get; set; }
|
2023-07-04 13:31:19 -04:00
|
|
|
public Enumerations.LewdnessFilterLevel? LewdnessFilterLevel { get; set; }
|
|
|
|
public Enumerations.MeannessFilterLevel? MeannessFilterLevel { get; set; }
|
|
|
|
|
|
|
|
internal DefinitePermissionSettings Definite()
|
|
|
|
{
|
|
|
|
return new DefinitePermissionSettings()
|
|
|
|
{
|
|
|
|
MaxAttachmentBytes = this.MaxAttachmentBytes ?? 0,
|
|
|
|
MaxTextChars = this.MaxTextChars ?? 0,
|
|
|
|
LinksAllowed = this.LinksAllowed ?? false,
|
|
|
|
LewdnessFilterLevel = this.LewdnessFilterLevel ?? Enumerations.LewdnessFilterLevel.G,
|
|
|
|
MeannessFilterLevel = this.MeannessFilterLevel ?? Enumerations.MeannessFilterLevel.Strict,
|
|
|
|
ReactionsPossible = this.ReactionsPossible ?? false
|
|
|
|
};
|
|
|
|
}
|
2023-06-01 00:03:23 -04:00
|
|
|
}
|
2023-07-04 13:31:19 -04:00
|
|
|
public class DefinitePermissionSettings
|
|
|
|
{
|
|
|
|
public ulong MaxAttachmentBytes { get; set; }
|
|
|
|
public uint MaxTextChars { get; set; }
|
|
|
|
public bool LinksAllowed { get; set; }
|
|
|
|
public bool ReactionsPossible { get; set; }
|
|
|
|
public Enumerations.LewdnessFilterLevel LewdnessFilterLevel { get; set; }
|
|
|
|
public Enumerations.MeannessFilterLevel MeannessFilterLevel { get; set; }
|
|
|
|
}
|