초기커밋
This commit is contained in:
31
BrokerApiCore/ApiModels/AccountApiModel.cs
Normal file
31
BrokerApiCore/ApiModels/AccountApiModel.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
namespace BrokerCore.ApiModels;
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
|
||||
public class DummyRequest
|
||||
{
|
||||
public required string Dummy { get; set; }
|
||||
}
|
||||
|
||||
public class DummyResponse
|
||||
{
|
||||
public required string Dummy { get; set; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("유저 로그인 요청")]
|
||||
public class LoginRequest
|
||||
{
|
||||
[Description("해당 플래닛 웹에서 런처로부터 받은 토큰")]
|
||||
public string? WebPortalToken { get; set; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("유저 로그인 응답")]
|
||||
public class LoginResponse
|
||||
{
|
||||
[Description("유저 guid")]
|
||||
public required string UserGuid { get; set; }
|
||||
[Description("유저 nickname")]
|
||||
public required string Nickname { get; set; }
|
||||
}
|
||||
56
BrokerApiCore/ApiModels/AdminModel.cs
Normal file
56
BrokerApiCore/ApiModels/AdminModel.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
namespace BrokerCore.ApiModels;
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
|
||||
public class AdminSapphireChangeRequest
|
||||
{
|
||||
public string AccountId { get; set; } = string.Empty;
|
||||
public string UserGuid { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public required int SapphireDelta { get; set; }
|
||||
}
|
||||
|
||||
public class AdminSapphireChangeResponse
|
||||
{
|
||||
public string AccountId { get; set; } = string.Empty;
|
||||
public string UserGuid { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public required int SapphireDelta { get; set; }
|
||||
public long SapphireCurrentAmount { get; set; }
|
||||
}
|
||||
|
||||
[SwaggerSchema(
|
||||
"교환 주문 목록 요청 <br> - SsoAccountId 또는 UserGuid 중 하나를 선택해서 유저 구분 <br> - seasonId는 필수로 입력 (관련 내용은 사업부에 문의)")]
|
||||
public class AdminItemExchangeOrderListRequest
|
||||
{
|
||||
[Description("SsoAccountId => sso의 accountId로 조회할 경우, UserGuid 불필요")]
|
||||
public string SsoAccountId { get; init; } = string.Empty;
|
||||
|
||||
[Description("사용자 GUID => UserGuid으로 조회할 경우, SsoAccountId 불필요")]
|
||||
public string UserGuid { get; init; } = string.Empty;
|
||||
|
||||
[Description("조회할 PlanetId => 웹 포탈에서 조회시 이기몹의 교환 정보를 얻으려면 반드시 igm26_iggymob을 명시해야함")]
|
||||
public required string PlanetId { get; init; } = string.Empty;
|
||||
|
||||
[Description("시즌 아이디 => 이기몹 게임 시즌 이름으로 해당 시즌만 조회 (빈문자열 일 경우, 모두 조회)")]
|
||||
public required string SeasonId { get; init; } = string.Empty;
|
||||
|
||||
[Description("플래닛 아이템 교환 메타 ID => 메타테이블의 ID (빈문자열 일 경우 모두 조회)")]
|
||||
public required string ExchangeMetaId { get; init; }
|
||||
|
||||
[Description("조회 옵션 => 'All': 전체, 'Pending': 대기, 'Completed': 완료")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public required FindOption Option { get; init; }
|
||||
|
||||
public DateTime? StartDate { get; init; }
|
||||
public DateTime? EndDate { get; init; }
|
||||
|
||||
[Description("페이지 번호 (기본값:1)")] public int PageIndex { get; init; } = 1;
|
||||
[Description("페이지 크기 (기본값:20)")] public int PageSize { get; init; } = 20;
|
||||
|
||||
[Description("정렬 기준 => asc: 오름차순, desc: 내림차순")]
|
||||
public string SortOrder { get; init; } = "asc";
|
||||
}
|
||||
13
BrokerApiCore/ApiModels/CommonApiModel.cs
Normal file
13
BrokerApiCore/ApiModels/CommonApiModel.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace BrokerCore.ApiModels;
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
public class ApiErrorResponse
|
||||
{
|
||||
[Description("에러 추척용 id")]
|
||||
public required string TraceId { get; set; }
|
||||
[Description("에러 코드")]
|
||||
public int ErrorCode { get; set; } = (int)ServerErrorCode.InternalServerError;
|
||||
[Description("에러 메시지")]
|
||||
public string ErrorMessage { get; set; } = null!;
|
||||
}
|
||||
173
BrokerApiCore/ApiModels/ExchangeApiModel.cs
Normal file
173
BrokerApiCore/ApiModels/ExchangeApiModel.cs
Normal file
@@ -0,0 +1,173 @@
|
||||
using System.ComponentModel;
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
|
||||
namespace BrokerCore.ApiModels;
|
||||
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
using Common;
|
||||
|
||||
using DbEntity;
|
||||
|
||||
using ServerCommon;
|
||||
|
||||
[SwaggerSchema("사파이어 잔액 요청")]
|
||||
public class SapphireRequest
|
||||
{
|
||||
[Description("사용자 GUID")]
|
||||
public required string UserGuid { get; init; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("사파이어 잔액 응답")]
|
||||
public class SapphireResponse
|
||||
{
|
||||
[Description("사파이어 잔액")]
|
||||
public required long Amount { get; init; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("교환 주문 정보")]
|
||||
public class ExchangeOrder
|
||||
{
|
||||
[Description("주문 ID")]
|
||||
public required string OrderId { get; init; }
|
||||
|
||||
[Description("사파이어 수량 - 삭제 예정"), SwaggerIgnore]
|
||||
public long? SapphireAmount { get; init; }
|
||||
|
||||
[Description("사파이어 차감 수량")]
|
||||
public required long SapphireReduceAmount { get; init; }
|
||||
|
||||
[Description("에메랄드 수량")]
|
||||
public required long EmeraldAmount { get; init; }
|
||||
|
||||
[Description("주문 생성 시간")]
|
||||
public required DateTime CreatedAt { get; init; }
|
||||
|
||||
[Description("주문 완료 시간")]
|
||||
public DateTime? CompletedAt { get; init; }
|
||||
|
||||
[Description("주문 상태")]
|
||||
public required ExchangeOrderStatus Status { get; init; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("칼리버스와 플래닛 간 재화 교환 주문 정보")]
|
||||
public class CurrencyExchangeOrder
|
||||
{
|
||||
[Description("주문 ID")]
|
||||
public required string OrderId { get; init; }
|
||||
|
||||
[Description("재화 타입 - ")]
|
||||
public required CurrencyType CurrencyType { get; init; }
|
||||
|
||||
[Description("플래닛의 재화 변동 수량")]
|
||||
public required long CurrencyDeltaAmount { get; init; }
|
||||
|
||||
[Description("재화 타입 - ")]
|
||||
public required PlanetCurrencyType PlanetCurrencyType { get; init; }
|
||||
|
||||
[Description("플래닛의 재화 변동 수량")]
|
||||
public required long PlanetCurrencyDeltaAmount { get; init; }
|
||||
|
||||
[Description("주문 생성 시간")]
|
||||
public required DateTime CreatedAt { get; init; }
|
||||
|
||||
[Description("주문 완료 시간")]
|
||||
public DateTime? CompletedAt { get; init; }
|
||||
|
||||
[Description("주문 상태")]
|
||||
public required ExchangeOrderStatus Status { get; init; }
|
||||
}
|
||||
|
||||
// [SwaggerSchema("조회 옵션")]
|
||||
// [JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
[SwaggerSchema("조회 옵션 - 'All': 전체, 'Pending': 대기, 'Completed': 완료")]
|
||||
public enum FindOption
|
||||
{
|
||||
[Description("전체 목록 조회")]
|
||||
// [EnumMember(Value = "All")]
|
||||
All = 0,
|
||||
// [EnumMember(Value = "Pending")]
|
||||
[Description("대기 중인 주문 조회")]
|
||||
Pending = 1,
|
||||
[Description("완료된 주문 조회")]
|
||||
// [EnumMember(Value = "Completed")]
|
||||
Completed = 2
|
||||
}
|
||||
|
||||
[SwaggerSchema("교환 주문 목록 요청")]
|
||||
public class ExchangeOrderListRequest
|
||||
{
|
||||
[Description("사용자 GUID")]
|
||||
public required string UserGuid { get; init; }
|
||||
[Description("조회 옵션 (0: 전체, 1: 대기, 2: 완료)")]
|
||||
public required FindOption Option { get; init; }
|
||||
[Description("페이지 번호")]
|
||||
public int PageIndex { get; set; } = 1;
|
||||
[Description("페이지 크기")]
|
||||
public int PageSize { get; set; } = 20;
|
||||
[Description("정렬 기준 => asc: 오름차순, desc: 내림차순")]
|
||||
public string SortOrder { get; set; } = "asc";
|
||||
}
|
||||
|
||||
[SwaggerSchema("교환 주문 목록 응답")]
|
||||
public class ExchangeOrderListResponse
|
||||
{
|
||||
[Description("교환 주문 목록")]
|
||||
public required IEnumerable<ExchangeOrder> Orders { get; init; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("교환 주문 요청")]
|
||||
public class ExchangeOrderRequest
|
||||
{
|
||||
[Description("사용자 GUID")]
|
||||
public required string UserGuid { get; set; }
|
||||
|
||||
[Description("차감을 요청할 사파이어 수량")]
|
||||
public long Sapphire { get; set; }
|
||||
|
||||
[Description("요청할 에메랄드 수량")]
|
||||
public long Emerald { get; set; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("교환 주문 응답")]
|
||||
public class ExchangeOrderResponse
|
||||
{
|
||||
[Description("주문 ID")]
|
||||
public required string OrderId { get; init; }
|
||||
|
||||
[Description("차감 사파이어 수량")]
|
||||
public long SapphireAmount { get; init; }
|
||||
|
||||
[Description("에메랄드 수량")]
|
||||
public long EmeraldAmount { get; init; }
|
||||
|
||||
[Description("현재 사파이어 잔액")]
|
||||
public long CurrentSapphireBalance { get; init; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("교환 주문 완료 요청")]
|
||||
public class ExchangeOrderCompleteRequest
|
||||
{
|
||||
[Description("주문 ID")]
|
||||
public required string OrderId { get; set; }
|
||||
|
||||
[Description("사용자 GUID")]
|
||||
public required string UserGuid { get; set; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("교환 주문 완료 응답")]
|
||||
public class ExchangeOrderCompleteResponse
|
||||
{
|
||||
[Description("주문 ID")]
|
||||
public required string OrderId { get; init; }
|
||||
|
||||
[Description("사파이어 수량")]
|
||||
public long SapphireAmount { get; init; }
|
||||
|
||||
[Description("에메랄드 수량")]
|
||||
public long EmeraldAmount { get; init; }
|
||||
|
||||
[Description("현재 주문 상태")]
|
||||
public ExchangeOrderStatus Status { get; init; }
|
||||
}
|
||||
20
BrokerApiCore/ApiModels/PlanetAuthApiModel.cs
Normal file
20
BrokerApiCore/ApiModels/PlanetAuthApiModel.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace BrokerCore.ApiModels;
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
|
||||
[SwaggerSchema("플래닛 인증 요청")]
|
||||
public class PlanetAuthRequest
|
||||
{
|
||||
[Description("플래닛 id (칼리버스에서 발급)")]
|
||||
public string? PlanetId { get; set; }
|
||||
[Description("플래닛의 시크릿 키 (칼리버스에서 발급)")]
|
||||
public string? PlanetSecretKey { get; set; }
|
||||
}
|
||||
|
||||
public class PlanetAuthResponse
|
||||
{
|
||||
[Description("업체 인증용 jwt 엑세스 토큰")]
|
||||
public required string AccessToken { get; set; }
|
||||
}
|
||||
90
BrokerApiCore/ApiModels/PlanetItemExchangeApiModel.cs
Normal file
90
BrokerApiCore/ApiModels/PlanetItemExchangeApiModel.cs
Normal file
@@ -0,0 +1,90 @@
|
||||
namespace BrokerCore.ApiModels;
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
|
||||
[SwaggerSchema("재화 잔액 요청")]
|
||||
public class CurrencyBalanceRequest
|
||||
{
|
||||
[Description("칼리버스 재화 타입 : Sapphire (현재는 Sapphire 만 사용)")]
|
||||
public string CaliverseCurrencyType { get; init; } = CurrencyType.Sapphire.ToString();
|
||||
|
||||
[Description("SsoAccountId - sso의 accountId로 조회할 경우, UserGuid 불필요")]
|
||||
public string SsoAccountId { get; init; } = string.Empty;
|
||||
|
||||
[Description("사용자 GUID - UserGuid으로 조회할 경우, SsoAccountId 불필요")]
|
||||
public string UserGuid { get; init; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("재화 잔액 응답")]
|
||||
public class CurrencyBalanceResponse
|
||||
{
|
||||
[Description("칼리버스 재화 타입 : Sapphire (현재는 Sapphire 만 사용)")]
|
||||
public string CaliverseCurrencyType { get; init; }
|
||||
|
||||
[Description("사용자 잔액")] public double Amount { get; init; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("아이템 교환 요청")]
|
||||
public class PlanetItemExchangeRequest
|
||||
{
|
||||
[Description("사용자 GUID")] public required string UserGuid { get; init; }
|
||||
|
||||
[Description("시즌 아이디 => 이기몹 게임 시즌 이름 (사업부에 문의 - 테스트 시에는 아무거나 사용 가능)")]
|
||||
public required string SeasonId { get; init; } = string.Empty;
|
||||
|
||||
[Description("플래닛 아이템 교환 메타 ID")] public required string ExchangeMetaId { get; init; }
|
||||
[Description("플래닛 아이템 교환 메타 개수")] public required int ExchangeMetaAmount { get; init; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("아이템 교환 응답")]
|
||||
public class PlanetItemExchangeResponse
|
||||
{
|
||||
[Description("교환 주문 정보")] public required PlanetItemExchangeOrderDto ExchangeOrder { get; init; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("아이템 교환 요청")]
|
||||
public class PlanetItemExchangeCompleteRequest
|
||||
{
|
||||
[Description("사용자 GUID")] public required string UserGuid { get; init; }
|
||||
|
||||
[Description("플래닛 아이템 주문 ID")] public required string ExchangeOrderId { get; init; }
|
||||
}
|
||||
|
||||
[SwaggerSchema(
|
||||
"교환 주문 목록 요청 <br> - SsoAccountId 또는 UserGuid 중 하나를 선택해서 유저 구분 <br> - seasonId는 필수로 입력 (관련 내용은 사업부에 문의)")]
|
||||
public class PlanetItemExchangeOrderListRequest
|
||||
{
|
||||
[Description("SsoAccountId => sso의 accountId로 조회할 경우, UserGuid 불필요")]
|
||||
public string SsoAccountId { get; init; } = string.Empty;
|
||||
|
||||
[Description("사용자 GUID => UserGuid으로 조회할 경우, SsoAccountId 불필요")]
|
||||
public string UserGuid { get; init; } = string.Empty;
|
||||
|
||||
[Description("조회할 PlanetId => 웹 포탈에서 조회시 이기몹의 교환 정보를 얻으려면 반드시 igm26_iggymob을 명시해야함")]
|
||||
public required string PlanetId { get; init; } = string.Empty;
|
||||
|
||||
[Description("시즌 아이디 => 이기몹 게임 시즌 이름으로 해당 시즌만 조회 (빈문자열 일 경우, 모두 조회)")]
|
||||
public required string SeasonId { get; init; } = string.Empty;
|
||||
|
||||
[Description("플래닛 아이템 교환 메타 ID => 메타테이블의 ID (빈문자열 일 경우 모두 조회)")]
|
||||
public required string ExchangeMetaId { get; init; }
|
||||
|
||||
[Description("조회 옵션 => 'All': 전체, 'Pending': 대기, 'Completed': 완료")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public required FindOption Option { get; init; }
|
||||
[Description("페이지 번호 (기본값:1)")] public int PageIndex { get; init; } = 1;
|
||||
[Description("페이지 크기 (기본값:20)")] public int PageSize { get; init; } = 20;
|
||||
|
||||
[Description("정렬 기준 => asc: 오름차순, desc: 내림차순")]
|
||||
public string SortOrder { get; init; } = "asc";
|
||||
}
|
||||
|
||||
[SwaggerSchema("교환 주문 목록 응답")]
|
||||
public class PlanetItemExchangeOrderListResponse
|
||||
{
|
||||
[Description("교환 주문 목록")] public required IEnumerable<PlanetItemExchangeOrderDto> Orders { get; init; }
|
||||
[Description("교환 주문 총 개수")] public required int TotalCount { get; init; }
|
||||
}
|
||||
34
BrokerApiCore/ApiModels/PlanetItemExchangeOrderDto.cs
Normal file
34
BrokerApiCore/ApiModels/PlanetItemExchangeOrderDto.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
namespace BrokerCore.ApiModels;
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
using DbEntity;
|
||||
|
||||
using ServerCommon;
|
||||
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
|
||||
[SwaggerSchema("플래닛 아이템 교환 주문 정보")]
|
||||
public class PlanetItemExchangeOrderDto
|
||||
{
|
||||
[Description("교환 주문 아이디")] public required string OrderId { get; init; }
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
[Description("교환 주문 상태")] public required ExchangeOrderStatus OrderStatus { get; set; }
|
||||
[Description("시즌 아이디")] public string SeasonId { get; init; } = string.Empty;
|
||||
[Description("플래닛 아이템 교환 메타 ID")] public required string ExchangeMetaId { get; set; }
|
||||
[Description("플래닛 아이템 교환 메타 갯수")] public required long ExchangeMetaAmount { get; set; }
|
||||
[Description("SSO 아이디")] public required string AccountId { get; init; }
|
||||
[Description("유저 아이디")] public required string UserGuid { get; set; }
|
||||
[Description("플래닛 아이디")] public required string PlanetId { get; set; }
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
[Description("칼리버스 아이템 타입")] public required CaliverseItemType CaliverseItemType { get; set; }
|
||||
[Description("칼리버스 아이템 아이디")] public required string CaliverseItemId { get; set; }
|
||||
[Description("칼리버스 아이템 증감 갯수")] public required long CaliverseItemDeltaAmount { get; set; }
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
[Description("플래닛 아이템 타입")] public required PlanetItemType PlanetItemType { get; set; }
|
||||
[Description("플래닛 아이템 아이디")] public required string PlanetItemId { get; set; }
|
||||
[Description("플래닛 아이템 증감 갯수")] public required long PlanetItemDeltaAmount { get; set; }
|
||||
[Description("교환 주문 시작 시간")] public DateTime CreatedAt { get; set; }
|
||||
[Description("교환 주문 완료 시간")] public DateTime? CompletedAt { get; set; }
|
||||
}
|
||||
39
BrokerApiCore/ApiModels/UserApiModel.cs
Normal file
39
BrokerApiCore/ApiModels/UserApiModel.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System.ComponentModel;
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
|
||||
namespace BrokerCore.ApiModels;
|
||||
|
||||
[SwaggerSchema("유저 사파이어 잔액 요청")]
|
||||
public class UserSapphireRequest
|
||||
{
|
||||
}
|
||||
|
||||
[SwaggerSchema("유저 사파이어 잔액 응답")]
|
||||
public class UserSapphireResponse
|
||||
{
|
||||
[Description("사파이어 잔액")]
|
||||
public required long SapphireAmount { get; init; }
|
||||
}
|
||||
|
||||
[SwaggerSchema("유저 교환 주문 목록 요청")]
|
||||
public class UserExchangeOrderListRequest
|
||||
{
|
||||
[Description("플래닛 GUID")]
|
||||
public required string PlanetId { get; init; }
|
||||
[Description("조회 옵션 (0: 전체, 1: 대기, 2: 완료)")]
|
||||
public required FindOption Option { get; init; }
|
||||
[Description("페이지 번호")]
|
||||
public int PageIndex { get; set; } = 1;
|
||||
[Description("페이지 크기")]
|
||||
public int PageSize { get; set; } = 20;
|
||||
[Description("정렬 기준 => asc: 오름차순, desc: 내림차순")]
|
||||
public string SortOrder { get; set; } = "asc";
|
||||
|
||||
}
|
||||
|
||||
[SwaggerSchema("유저 교환 주문 목록 응답")]
|
||||
public class UserExchangeOrderListResponse
|
||||
{
|
||||
[Description("교환 주문 목록")]
|
||||
public required IEnumerable<ExchangeOrder> Orders { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user