2026-10-01 11:25:05 +02:00
|
|
|
using PrivaPub.ClientModels.Resources;
|
|
|
|
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
namespace PrivaPub.ClientModels.Admin
|
|
|
|
|
{
|
|
|
|
|
public class DomainBlockForm
|
|
|
|
|
{
|
|
|
|
|
[Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ErrorsResource)),
|
|
|
|
|
StringLength(253, MinimumLength = 3, ErrorMessageResourceName = "StringLengthMinMax", ErrorMessageResourceType = typeof(ErrorsResource))]
|
|
|
|
|
public string Domain { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool Suspend { get; set; } = true;
|
|
|
|
|
public bool RejectMedia { get; set; }
|
2026-10-17 04:02:47 +02:00
|
|
|
// listed at /api/v1/instance/domain_blocks (off by default: it tells the blocked server, and everyone, of the block)
|
|
|
|
|
public bool Published { get; set; } = false;
|
|
|
|
|
public bool Obfuscate { get; set; } = false;//listed with part of its name hidden
|
2026-10-01 11:25:05 +02:00
|
|
|
|
|
|
|
|
[StringLength(1000, ErrorMessageResourceName = "MaxLengthString", ErrorMessageResourceType = typeof(ErrorsResource))]
|
|
|
|
|
public string PublicComment { get; set; }
|
|
|
|
|
|
|
|
|
|
[StringLength(1000, ErrorMessageResourceName = "MaxLengthString", ErrorMessageResourceType = typeof(ErrorsResource))]
|
|
|
|
|
public string PrivateComment { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ViewDomainBlock
|
|
|
|
|
{
|
|
|
|
|
public string Id { get; set; }
|
|
|
|
|
public string Domain { get; set; }
|
|
|
|
|
public string Severity { get; set; }
|
|
|
|
|
public bool RejectMedia { get; set; }
|
|
|
|
|
public string PublicComment { get; set; }
|
|
|
|
|
public string PrivateComment { get; set; }
|
2026-10-17 04:02:47 +02:00
|
|
|
public bool Published { get; set; } = false;
|
|
|
|
|
public bool Obfuscate { get; set; } = false;
|
2026-10-01 11:25:05 +02:00
|
|
|
public DateTime CreatedAt { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|