Download ContactManagementAPI/ViewModels/AdminViewModels.cs from abrahamcbe/contact-management-system: direct link, hf CLI and curl.
- Browser
- Download file 3.2 kB
-
https://huggingface.co/spaces/abrahamcbe/contact-management-system/resolve/main/ContactManagementAPI/ViewModels/AdminViewModels.cs
- Command line
-
hf download hf://spaces/abrahamcbe/contact-management-system/ContactManagementAPI/ViewModels/AdminViewModels.cs
-
curl -L -o AdminViewModels.cs https://huggingface.co/spaces/abrahamcbe/contact-management-system/resolve/main/ContactManagementAPI/ViewModels/AdminViewModels.cs
3.2 kB
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel.DataAnnotations; | |
| namespace ContactManagementAPI.ViewModels | |
| { | |
| public class LoginViewModel | |
| { | |
| [] | |
| [] | |
| public string UserName { get; set; } = string.Empty; | |
| [] | |
| [] | |
| public string Password { get; set; } = string.Empty; | |
| public string? ReturnUrl { get; set; } | |
| } | |
| public class UserCreateViewModel | |
| { | |
| [] | |
| [] | |
| public string UserName { get; set; } = string.Empty; | |
| [] | |
| [] | |
| public string Password { get; set; } = string.Empty; | |
| [] | |
| public string? FullName { get; set; } | |
| [] | |
| public int GroupId { get; set; } | |
| public bool IsAdmin { get; set; } | |
| public bool IsActive { get; set; } = true; | |
| } | |
| public class UserEditViewModel | |
| { | |
| public int Id { get; set; } | |
| [] | |
| [] | |
| public string UserName { get; set; } = string.Empty; | |
| [] | |
| public string? FullName { get; set; } | |
| [] | |
| public string? NewPassword { get; set; } | |
| [] | |
| public int GroupId { get; set; } | |
| public bool IsAdmin { get; set; } | |
| public bool IsActive { get; set; } = true; | |
| } | |
| public class GroupEditViewModel | |
| { | |
| public int Id { get; set; } | |
| [] | |
| [] | |
| public string Name { get; set; } = string.Empty; | |
| [] | |
| public string? Description { get; set; } | |
| } | |
| public class RightAssignmentViewModel | |
| { | |
| public string Key { get; set; } = string.Empty; | |
| public string Category { get; set; } = string.Empty; | |
| public string Label { get; set; } = string.Empty; | |
| public bool IsGranted { get; set; } | |
| public string Selection { get; set; } = "Inherit"; | |
| public bool EffectiveGranted { get; set; } | |
| public string EffectiveSource { get; set; } = ""; | |
| } | |
| public class GroupRightsViewModel | |
| { | |
| public int GroupId { get; set; } | |
| public string GroupName { get; set; } = string.Empty; | |
| public List<RightAssignmentViewModel> Rights { get; set; } = new(); | |
| } | |
| public class UserRightsViewModel | |
| { | |
| public int UserId { get; set; } | |
| public string UserName { get; set; } = string.Empty; | |
| public string? GroupName { get; set; } | |
| public List<RightAssignmentViewModel> Rights { get; set; } = new(); | |
| } | |
| public class AdminHistoryEntryViewModel | |
| { | |
| public string ActionType { get; set; } = string.Empty; | |
| public string EntityType { get; set; } = string.Empty; | |
| public int? EntityId { get; set; } | |
| public string Details { get; set; } = string.Empty; | |
| public string PerformedBy { get; set; } = string.Empty; | |
| public DateTime PerformedAt { get; set; } | |
| } | |
| public class AdminHistoryListViewModel | |
| { | |
| public List<AdminHistoryEntryViewModel> Entries { get; set; } = new(); | |
| } | |
| } | |