Lots of additions and restructuring
This commit is contained in:
@@ -5,23 +5,10 @@ namespace TOOHUCardAPI.DTO
|
||||
{
|
||||
public abstract class AbstractResponse
|
||||
{
|
||||
public static string SUCCESS_CODE = "0000";
|
||||
[JsonProperty("code")]
|
||||
public string Code { get; set; } = SUCCESS_CODE;
|
||||
public abstract string Code { get; }
|
||||
[JsonProperty("msg")]
|
||||
public string Message { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class InvalidUserResponse : AbstractResponse
|
||||
{
|
||||
public InvalidUserResponse()
|
||||
{
|
||||
Code = "0001";
|
||||
Message = "Invalid user";
|
||||
}
|
||||
}
|
||||
|
||||
public class OkResponse : AbstractResponse
|
||||
{
|
||||
public abstract string Message { get; }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user