First commit. Include junk from template to remove
This commit is contained in:
27
src/Application/TodoLists/Queries/GetTodos/TodoItemDto.cs
Normal file
27
src/Application/TodoLists/Queries/GetTodos/TodoItemDto.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Hutopy.Domain.Entities;
|
||||
|
||||
namespace Hutopy.Application.TodoLists.Queries.GetTodos;
|
||||
|
||||
public class TodoItemDto
|
||||
{
|
||||
public int Id { get; init; }
|
||||
|
||||
public int ListId { get; init; }
|
||||
|
||||
public string? Title { get; init; }
|
||||
|
||||
public bool Done { get; init; }
|
||||
|
||||
public int Priority { get; init; }
|
||||
|
||||
public string? Note { get; init; }
|
||||
|
||||
private class Mapping : Profile
|
||||
{
|
||||
public Mapping()
|
||||
{
|
||||
CreateMap<TodoItem, TodoItemDto>().ForMember(d => d.Priority,
|
||||
opt => opt.MapFrom(s => (int)s.Priority));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user