Files
myoffice/MyOffice.Web/Models/Account/AccountViewModel.cs
T
2023-07-28 21:18:18 +03:00

43 lines
1.0 KiB
C#

namespace MyOffice.Web.Models.Account
{
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
public class AccountViewModel
{
public string? Id { get; set; }
[Required]
public string Name { get; set; } = null!;
public string Type { get; set; } = null!;
[Required]
public string CurrencyId { get; set; } = null!;
public string? CurrencyName { get; set; }
public bool AllowDelete { get; set; }
public bool AllowManage { get; set; }
public List<AccountCategoryViewModel>? Categories { get; set; }
[Required]
public string CategoryId { get; set; } = null!;
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<AccessRightsViewModel>? AccessRights { get; set; }
}
public class AccountAccessViewModel
{
public class AccountAccessItemViewModel
{
public string UserId { get; set; } = null!;
public bool AllowWrite { get; set; }
}
public string? Email { get; set; }
public bool AllowWrite { get; set; }
public List<AccountAccessItemViewModel> Accesses { get; set; } = null!;
}
}