-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAdmin.cs
More file actions
67 lines (56 loc) · 1.7 KB
/
Admin.cs
File metadata and controls
67 lines (56 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using ServiceStack;
using System.Collections.Generic;
namespace BlazorDiffusion.ServiceModel;
/*Admin APIs*/
[Tag(Tag.Admin)]
[ValidateIsAdmin]
public class AdminQueryArtifactComments : QueryDb<ArtifactComment> { }
[Tag(Tag.Admin)]
[ValidateIsAdmin]
[AutoApply(Behavior.AuditModify)]
public class AdminUpdateArtifactComment : IPatchDb<ArtifactComment>, IReturn<ArtifactComment>
{
public int Id { get; set; }
public int? ReplyId { get; set; }
[ValidateLength(1, 280)]
public string? Content { get; set; }
public string? Notes { get; set; }
[Input(Type = "select", EvalAllowableValues = "AppData.FlagReasons")]
public string? FlagReason { get; set; }
}
[Tag(Tag.Admin)]
[ValidateIsAdmin]
public class AdminDeleteArtifactComment : IDeleteDb<ArtifactComment>, IReturnVoid
{
public int Id { get; set; }
}
[Tag(Tag.Admin)]
[ValidateIsAdmin]
public class AdminQueryArtifactCommentReports : QueryDb<ArtifactCommentReport> { }
[Tag(Tag.Admin)]
[ValidateIsAdmin]
public class AdminUpdateArtifactCommentReport : IPatchDb<ArtifactCommentReport>, IReturn<ArtifactCommentReport>
{
public int Id { get; set; }
public PostReport? PostReport { get; set; }
public string? Description { get; set; }
}
[Tag(Tag.Admin)]
[ValidateIsAdmin]
public class AdminDeleteArtifactCommentReport : IDeleteDb<ArtifactCommentReport>, IReturnVoid
{
public int Id { get; set; }
}
[Tag(Tag.Admin)]
[ValidateIsAdmin]
public class AdminData : IGet, IReturn<AdminDataResponse> { }
public class PageStats
{
public string Label { get; set; }
public int Total { get; set; }
}
public class AdminDataResponse
{
public List<PageStats> PageStats { get; set; }
public ResponseStatus ResponseStatus { get; set; }
}