refactoring
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
using Core.Extensions;
|
||||
using Data.Models.Accounts;
|
||||
|
||||
public class MotionCategoryViewModel
|
||||
public class AccountCategoryViewModel
|
||||
{
|
||||
public string? Id { get; set; }
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
public static class AccountCategoryViewModelExtensions
|
||||
{
|
||||
public static MotionCategoryViewModel ToModel(this AccountCategory input)
|
||||
public static AccountCategoryViewModel ToModel(this AccountCategory input)
|
||||
{
|
||||
return new MotionCategoryViewModel
|
||||
return new AccountCategoryViewModel
|
||||
{
|
||||
Id = input.Id.ToShort(),
|
||||
Name = input.Name,
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace MyOffice.Web.Models.Account
|
||||
{
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
public class AccountMotionsGetModel
|
||||
{
|
||||
[Required]
|
||||
public DateTime From { get; set; }
|
||||
[Required]
|
||||
public DateTime To { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Core.Extensions;
|
||||
using Data.Models.Accounts;
|
||||
using User;
|
||||
|
||||
public class AccountViewModel
|
||||
{
|
||||
@@ -16,7 +15,7 @@
|
||||
public string CurrencyId { get; set; } = null!;
|
||||
public string? CurrencyName { get; set; }
|
||||
|
||||
public List<MotionCategoryViewModel>? Categories { get; set; }
|
||||
public List<AccountCategoryViewModel>? Categories { get; set; }
|
||||
|
||||
[Required]
|
||||
public string CategoryId { get; set; } = null!;
|
||||
|
||||
Reference in New Issue
Block a user