1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

default collection on org create

This commit is contained in:
Kyle Spearrin
2017-08-30 21:25:46 -04:00
parent 20779014b0
commit e43c3baf6e
6 changed files with 28 additions and 14 deletions

View File

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Bit.Core.Utilities;
namespace Bit.Core.Models.Api
{
@ -6,5 +7,8 @@ namespace Bit.Core.Models.Api
{
[Required]
public string Key { get; set; }
[EncryptedString]
[StringLength(1000)]
public string CollectionName { get; set; }
}
}

View File

@ -3,6 +3,7 @@ using Bit.Core.Enums;
using Bit.Core.Models.Business;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using Bit.Core.Utilities;
namespace Bit.Core.Models.Api
{
@ -25,6 +26,9 @@ namespace Bit.Core.Models.Api
public short AdditionalSeats { get; set; }
[Range(0, 99)]
public short? AdditionalStorageGb { get; set; }
[EncryptedString]
[StringLength(1000)]
public string CollectionName { get; set; }
public virtual OrganizationSignup ToOrganizationSignup(User user)
{
@ -38,7 +42,8 @@ namespace Bit.Core.Models.Api
AdditionalSeats = AdditionalSeats,
AdditionalStorageGb = AdditionalStorageGb.GetValueOrDefault(0),
BillingEmail = BillingEmail,
BusinessName = BusinessName
BusinessName = BusinessName,
CollectionName = CollectionName
};
}

View File

@ -13,5 +13,6 @@ namespace Bit.Core.Models.Business
public short AdditionalSeats { get; set; }
public short AdditionalStorageGb { get; set; }
public string PaymentToken { get; set; }
public string CollectionName { get; set; }
}
}