You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
871 B
33 lines
871 B
using HeartTrack.Models;
|
|
using static MudBlazor.CategoryTypes;
|
|
|
|
namespace HeartTrack.Factories
|
|
{
|
|
public static class TicketFactory
|
|
{
|
|
public static TicketModel ToModel(Ticket item)
|
|
{
|
|
return new TicketModel
|
|
{
|
|
Id = item.Id,
|
|
Username = item.Username,
|
|
Contexte = item.Contexte,
|
|
Description = item.Description,
|
|
Urgence = Convert.ToBoolean(item.Urgence)
|
|
};
|
|
}
|
|
|
|
public static Ticket Create(TicketModel model)
|
|
{
|
|
return new Ticket
|
|
{
|
|
Id = model.Id,
|
|
Username = model.Username,
|
|
Contexte = model.Contexte,
|
|
Description = model.Description,
|
|
Urgence = Convert.ToString(model.Urgence)
|
|
};
|
|
}
|
|
}
|
|
}
|