mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
create/get/update collection with groups
This commit is contained in:
@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Utilities;
|
||||
using Bit.Core.Models.Table;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
@ -12,6 +13,7 @@ namespace Bit.Core.Models.Api
|
||||
[EncryptedString]
|
||||
[StringLength(300)]
|
||||
public string Name { get; set; }
|
||||
public IEnumerable<string> GroupIds { get; set; }
|
||||
|
||||
public Collection ToCollection(Guid orgId)
|
||||
{
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core.Models.Data;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
@ -37,6 +38,17 @@ namespace Bit.Core.Models.Api
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public class CollectionDetailsResponseModel : CollectionResponseModel
|
||||
{
|
||||
public CollectionDetailsResponseModel(Collection collection, IEnumerable<Guid> collectionIds)
|
||||
: base(collection, "collectionDetails")
|
||||
{
|
||||
CollectionIds = collectionIds;
|
||||
}
|
||||
|
||||
public IEnumerable<Guid> CollectionIds { get; set; }
|
||||
}
|
||||
|
||||
public class CollectionUserDetailsResponseModel : CollectionResponseModel
|
||||
{
|
||||
public CollectionUserDetailsResponseModel(CollectionUserCollectionDetails collection)
|
||||
|
Reference in New Issue
Block a user