Commit 9cf1d663 by Javier Piris

Añadidas properties al modelo de Message

parent 719be6f5
namespace inutralia.Models.Questions
{
using MvvmHelpers;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
......@@ -10,6 +9,14 @@
public class Message : ObservableEntityData
{
public enum Estatus
{
Pendiente,
Respondida_por_cliente,
Respondida_por_nutricionista,
Cerrado
};
public string StatusImg => imgStatus[StateId];
[JsonProperty("text", Required = Required.Always)]
......@@ -46,7 +53,8 @@
public int StateId { get; set; }
[JsonProperty("status", Required = Required.Always)]
public string State { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public Estatus State { get; set; }
[JsonProperty("subject", Required = Required.Always)]
public string Subject
......@@ -57,11 +65,11 @@
string _subject;
string[] imgStatus = new string[2]
string[] imgStatus = new string[4]
{
"pendiente.png", // 1 - Pendiente de responder
//"respondida_por_cliente.png", // 2 - Respondida por cliente
//"respondida_por_nutricionista", // 3- Respondida por nutricionista
"respondida_por_cliente.png", // 2 - Respondida por cliente
"respondida_por_nutricionista", // 3- Respondida por nutricionista
"cerrada" // 4 - Conversación cerrada
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment