2020-12-10 17:34:30 +01:00
|
|
|
|
namespace SessionCompanion.ViewModels.ApiResponses
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Wiadomość mówiąca o poprawnym wykonaniu zadania
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class SuccessResponse
|
|
|
|
|
{
|
2021-01-20 21:06:28 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Pusty konstruktor obiektu
|
|
|
|
|
/// </summary>
|
|
|
|
|
public SuccessResponse()
|
|
|
|
|
{ }
|
|
|
|
|
|
2020-12-10 17:34:30 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Konstruktor obiektu
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="message"> Wiadomość dotycząca operacji </param>
|
|
|
|
|
public SuccessResponse(string message)
|
|
|
|
|
{
|
2021-01-20 21:06:28 +01:00
|
|
|
|
this.StatusCode = 200;
|
|
|
|
|
this.Message = message;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Konstruktor obiektu
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="code"></param>
|
|
|
|
|
public SuccessResponse(int code)
|
|
|
|
|
{
|
|
|
|
|
this.StatusCode = code;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Konstruktor obiektu
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="code"></param>
|
|
|
|
|
/// <param name="message"></param>
|
|
|
|
|
public SuccessResponse(int code, string message)
|
|
|
|
|
{
|
|
|
|
|
this.StatusCode = code;
|
|
|
|
|
this.Message = message;
|
2020-12-10 17:34:30 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Kod odpowiedzi, domyślnie nadawany jest 200
|
|
|
|
|
/// </summary>
|
2021-01-20 21:06:28 +01:00
|
|
|
|
public int StatusCode { get; set; }
|
2020-12-10 17:34:30 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Wiadomość dotycząca wykoanania operacji
|
|
|
|
|
/// </summary>
|
2021-01-20 21:06:28 +01:00
|
|
|
|
public string Message { get; set; }
|
2020-12-10 17:34:30 +01:00
|
|
|
|
}
|
|
|
|
|
}
|