mirror of
https://github.com/bitwarden/server.git
synced 2026-02-05 08:33:10 +08:00
29 lines
596 B
C#
29 lines
596 B
C#
|
|
using System;
|
|||
|
|
using System.ComponentModel.DataAnnotations;
|
|||
|
|
using Bit.Core.Models.Table;
|
|||
|
|
using Newtonsoft.Json;
|
|||
|
|
|
|||
|
|
namespace Bit.Core.Models.Api
|
|||
|
|
{
|
|||
|
|
public class GroupRequestModel
|
|||
|
|
{
|
|||
|
|
[Required]
|
|||
|
|
[StringLength(300)]
|
|||
|
|
public string Name { get; set; }
|
|||
|
|
|
|||
|
|
public Group ToGroup(Guid orgId)
|
|||
|
|
{
|
|||
|
|
return ToGroup(new Group
|
|||
|
|
{
|
|||
|
|
OrganizationId = orgId
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public Group ToGroup(Group existingGroup)
|
|||
|
|
{
|
|||
|
|
existingGroup.Name = Name;
|
|||
|
|
return existingGroup;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|