|
@@ -1,93 +0,0 @@
|
|
|
-using System;
|
|
|
-using System.Collections.Generic;
|
|
|
-using System.ComponentModel.DataAnnotations;
|
|
|
-using VCommon.VApplication.Auditing.DataAnnotations;
|
|
|
-using VCommon.VApplication.Dto;
|
|
|
-using VCommon.VAutoMapper;
|
|
|
-using VCommonCoreExample.Entity;
|
|
|
-
|
|
|
-namespace VCommonCoreExample.AppServices.System.Users.Dto
|
|
|
-{
|
|
|
- public class UserListRequest : PagedRequest, IStringSearchFilter, IPassiveFilter
|
|
|
- {
|
|
|
- public string Search { get; set; }
|
|
|
- public bool? IsEnable { get; set; }
|
|
|
- public DateTimeRange CreateOn { get; set; }
|
|
|
- }
|
|
|
-
|
|
|
- [AutoMapFrom(typeof(User))]
|
|
|
- public class UserDto : EntityDto, IHaveName
|
|
|
- {
|
|
|
- [AutoMapJsonConvert()]
|
|
|
- public Guid[] Roles { get; set; }
|
|
|
-
|
|
|
- public string Name { get; set; }
|
|
|
-
|
|
|
- public string LoginName { get; set; }
|
|
|
-
|
|
|
- public bool IsEnable { get; set; }
|
|
|
- }
|
|
|
-
|
|
|
- public class UserListOutput : IPagedResult<UserDto>
|
|
|
- {
|
|
|
- public IReadOnlyCollection<NamedEntityDto> AvailableRoles { get; set; }
|
|
|
-
|
|
|
- public UserListOutput(int totalRecord, IReadOnlyList<UserDto> items)
|
|
|
- {
|
|
|
- TotalRecord = totalRecord;
|
|
|
- Items = items;
|
|
|
- }
|
|
|
-
|
|
|
- public int TotalRecord { get; }
|
|
|
-
|
|
|
- [SimplifyAuditingLog]
|
|
|
- public IReadOnlyList<UserDto> Items { get; }
|
|
|
- }
|
|
|
-
|
|
|
- public class UserFormPrepOutput
|
|
|
- {
|
|
|
- public UserDto Output { get; set; }
|
|
|
-
|
|
|
- public IReadOnlyCollection<NamedEntityDto> AvailableRoles { get; }
|
|
|
-
|
|
|
- public UserFormPrepOutput(IReadOnlyCollection<NamedEntityDto> availableRoles)
|
|
|
- {
|
|
|
- AvailableRoles = availableRoles;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public class UserCreateInput
|
|
|
- {
|
|
|
- [Required]
|
|
|
- [AutoMapJsonConvert]
|
|
|
- public Guid[] Roles { get; set; }
|
|
|
-
|
|
|
- [Required]
|
|
|
- public string Name { get; set; }
|
|
|
-
|
|
|
- [Required]
|
|
|
- public string LoginName { get; set; }
|
|
|
-
|
|
|
- [Required]
|
|
|
- public string Password { get; set; }
|
|
|
-
|
|
|
- public bool IsEnable { get; set; }
|
|
|
- }
|
|
|
-
|
|
|
- public class UserUpdateInput : EntityDto
|
|
|
- {
|
|
|
- [Required]
|
|
|
- [AutoMapJsonConvert]
|
|
|
- public Guid[] Roles { get; set; }
|
|
|
-
|
|
|
- [Required]
|
|
|
- public string Name { get; set; }
|
|
|
-
|
|
|
- [Required]
|
|
|
- public string LoginName { get; set; }
|
|
|
-
|
|
|
- public string Password { get; set; }
|
|
|
-
|
|
|
- public bool IsEnable { get; set; }
|
|
|
- }
|
|
|
-}
|