27 lines
628 B
C#
27 lines
628 B
C#
using System.Text.Json.Serialization;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace TOOHUCardAPI.DTO
|
|
{
|
|
public abstract class AbstractResponse
|
|
{
|
|
public static string SUCCESS_CODE = "0000";
|
|
[JsonProperty("code")]
|
|
public string Code { get; set; } = SUCCESS_CODE;
|
|
[JsonProperty("msg")]
|
|
public string Message { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class InvalidUserResponse : AbstractResponse
|
|
{
|
|
public InvalidUserResponse()
|
|
{
|
|
Code = "0001";
|
|
Message = "Invalid user";
|
|
}
|
|
}
|
|
|
|
public class OkResponse : AbstractResponse
|
|
{
|
|
}
|
|
} |