28 lines
597 B
C#
28 lines
597 B
C#
namespace MyOffice.Web.Models.Motion;
|
|
|
|
using MyOffice.Services.Account.Domain;
|
|
|
|
public class MotionRequest
|
|
{
|
|
public DateTime Date { get; set; }
|
|
public string Motion { get; set; } = null!;
|
|
public string? Description { get; set; }
|
|
public decimal? Plus { get; set; }
|
|
public decimal? Minus { get; set; }
|
|
}
|
|
|
|
public static class MotionRequestExtension
|
|
{
|
|
public static MotionAdd FromModel(this MotionRequest input)
|
|
{
|
|
return new MotionAdd
|
|
{
|
|
Date = input.Date,
|
|
Motion = input.Motion,
|
|
Minus = input.Minus ?? 0,
|
|
Plus = input.Plus ?? 0,
|
|
Description = input.Description,
|
|
};
|
|
}
|
|
}
|