1
0
mirror of https://github.com/bitwarden/server synced 2025-12-12 14:23:38 +00:00

move all models into core

This commit is contained in:
Kyle Spearrin
2017-03-08 21:55:08 -05:00
parent bd0c960e9f
commit 8bcd4e0463
60 changed files with 64 additions and 64 deletions

View File

@@ -0,0 +1,35 @@
using System;
using System.ComponentModel.DataAnnotations;
using Bit.Core.Utilities;
using Bit.Core.Models.Table;
using Newtonsoft.Json;
namespace Bit.Core.Models.Api
{
public class SubvaultCreateRequestModel : SubvaultUpdateRequestModel
{
public string OrganizationId { get; set; }
public Subvault ToSubvault()
{
return ToSubvault(new Subvault
{
OrganizationId = new Guid(OrganizationId)
});
}
}
public class SubvaultUpdateRequestModel
{
[Required]
[EncryptedString]
[StringLength(300)]
public string Name { get; set; }
public Subvault ToSubvault(Subvault existingSubvault)
{
existingSubvault.Name = Name;
return existingSubvault;
}
}
}