27 lines
695 B
C#
27 lines
695 B
C#
using Contracts.DTO;
|
|
using Infrastructure.Models;
|
|
|
|
namespace Infrastructure.Support.Mappers;
|
|
|
|
public static class SpendingPlanMapper
|
|
{
|
|
public static SpendingPlan ToModel(this SpendingPlanDto plan)
|
|
=> new()
|
|
{
|
|
Id = plan.Id,
|
|
StartAt = plan.StartAt,
|
|
EndAt = plan.EndAt,
|
|
Sum = plan.Sum,
|
|
SpendingGroupId = plan.SpendingGroupId
|
|
};
|
|
|
|
public static SpendingPlanDto ToDto(this SpendingPlan plan)
|
|
=> new()
|
|
{
|
|
Id = plan.Id,
|
|
StartAt = plan.StartAt,
|
|
EndAt = plan.EndAt,
|
|
Sum = plan.Sum,
|
|
SpendingGroupId = plan.SpendingGroupId
|
|
};
|
|
} |