초기커밋
This commit is contained in:
172
ServerCommon/UGQ/Models/UGQApiModels.cs
Normal file
172
ServerCommon/UGQ/Models/UGQApiModels.cs
Normal file
@@ -0,0 +1,172 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
|
||||
using UGQDatabase.Models;
|
||||
|
||||
|
||||
namespace ServerCommon.UGQ.Models;
|
||||
|
||||
|
||||
public class ApiErrorResponse
|
||||
{
|
||||
public int ErrorCode { get; set; }
|
||||
public string ErrorMessage { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class ValidationErrorResponse : ApiErrorResponse
|
||||
{
|
||||
public List<string> ValidationErrorMessages { get; set; } = null!;
|
||||
}
|
||||
|
||||
|
||||
public class UgqAccount
|
||||
{
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public UgqGradeType GradeType { get; set; }
|
||||
public double CreatorPoint { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class UgqQuestBoardRequest
|
||||
{
|
||||
[FromQuery(Name = "pageNumber")]
|
||||
public int PageNumber { get; set; }
|
||||
|
||||
[FromQuery(Name = "pageSize")]
|
||||
public int PageSize { get; set; }
|
||||
|
||||
[FromQuery(Name = "gradeType")]
|
||||
public UgqUICategoryGradeType GradeType { get; set; }
|
||||
|
||||
[FromQuery(Name = "searchType")]
|
||||
public UgqSearchType SearchType { get; set; }
|
||||
|
||||
[FromQuery(Name = "searchText")]
|
||||
public string? SearchText { get; set; }
|
||||
|
||||
[FromQuery(Name = "sortType")]
|
||||
public UgqSortType SortType { get; set; }
|
||||
}
|
||||
|
||||
public class UgqQuestIdRevisionRequest
|
||||
{
|
||||
[FromQuery(Name = "questId")]
|
||||
public long QuestId { get; set; }
|
||||
|
||||
[FromQuery(Name = "revision")]
|
||||
public long Revision { get; set; }
|
||||
}
|
||||
|
||||
public class UgqQuestAcceptedRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
|
||||
public long Revision { get; set; }
|
||||
|
||||
public UGQAcceptReason Reason { get; set; }
|
||||
}
|
||||
|
||||
public class UgqQuestCompletedRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
|
||||
public long Revision { get; set; }
|
||||
|
||||
public int Amount { get; set; }
|
||||
}
|
||||
|
||||
public class UgqQuestAbortedRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
|
||||
public long Revision { get; set; }
|
||||
|
||||
public UGQAbortReason Reason { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class UgqBookmarkRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
public string UserGuid { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class UgqUnbookmarkRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
public string UserGuid { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class UgqLikeRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
public long Revision { get; set; }
|
||||
public string UserGuid { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class UgqUnlikeRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
public long Revision { get; set; }
|
||||
public string UserGuid { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class UgqReportRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
public long Revision { get; set; }
|
||||
public string UserGuid { get; set; } = null!;
|
||||
|
||||
public string Contents { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class BeginCreatorPointRequest
|
||||
{
|
||||
public string UserGuid { get; set; } = null!;
|
||||
public int Point { get; set; }
|
||||
}
|
||||
|
||||
public class BeginCreatorPointResponse
|
||||
{
|
||||
public string ReceiptId { get; set; } = null!;
|
||||
}
|
||||
|
||||
|
||||
public class CancelCreatorPointRequest
|
||||
{
|
||||
public string UserGuid { get; set; } = null!;
|
||||
public string ReceiptId { get; set; } = null!;
|
||||
public string? CancelReason { get; set; }
|
||||
}
|
||||
|
||||
public class CommitCreatorPointRequest
|
||||
{
|
||||
public string UserGuid { get; set; } = null!;
|
||||
|
||||
public string ReceiptId { get; set; } = null!;
|
||||
}
|
||||
|
||||
|
||||
public class GameQuestDataSimple
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
public long Revision { get; set; }
|
||||
|
||||
public string UserGuid { get; set; } = null!;
|
||||
public string Author { get; set; } = null!;
|
||||
|
||||
public TextEntity Title { get; set; } = new TextEntity();
|
||||
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public UgqGradeType GradeType { get; set; } = UgqGradeType.Amature;
|
||||
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public QuestContentState State { get; set; }
|
||||
public int Cost { get; set; }
|
||||
|
||||
public bool Shutdown { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user