Files
server/src/Core/Models/Api/Response/CollectionUserResponseModel.cs

35 lines
1.1 KiB
C#
Raw Normal View History

2017-04-03 12:27:02 -04:00
using System;
using Bit.Core.Models.Data;
using Bit.Core.Enums;
namespace Bit.Core.Models.Api
{
2017-04-27 09:19:30 -04:00
public class CollectionUserResponseModel : ResponseModel
2017-04-03 12:27:02 -04:00
{
2017-05-11 14:52:35 -04:00
public CollectionUserResponseModel(CollectionUserDetails collectionUser)
2017-04-27 09:19:30 -04:00
: base("collectionUser")
2017-04-03 12:27:02 -04:00
{
2017-04-27 09:19:30 -04:00
if(collectionUser == null)
2017-04-03 12:27:02 -04:00
{
2017-04-27 09:19:30 -04:00
throw new ArgumentNullException(nameof(collectionUser));
2017-04-03 12:27:02 -04:00
}
2017-04-27 09:19:30 -04:00
OrganizationUserId = collectionUser.OrganizationUserId.ToString();
AccessAll = collectionUser.AccessAll;
2017-04-27 09:19:30 -04:00
Name = collectionUser.Name;
Email = collectionUser.Email;
Type = collectionUser.Type;
Status = collectionUser.Status;
ReadOnly = collectionUser.ReadOnly;
2017-04-03 12:27:02 -04:00
}
public string OrganizationUserId { get; set; }
public bool AccessAll { get; set; }
2017-04-03 12:27:02 -04:00
public string Name { get; set; }
public string Email { get; set; }
public OrganizationUserType Type { get; set; }
public OrganizationUserStatusType Status { get; set; }
public bool ReadOnly { get; set; }
}
}