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

organization signup apis and data model changes

This commit is contained in:
Kyle Spearrin
2017-03-03 00:07:11 -05:00
parent b18b6a44ef
commit 29e3605576
20 changed files with 371 additions and 131 deletions

View File

@ -1,5 +1,6 @@
using Bit.Core.Domains;
using Bit.Core.Enums;
using Bit.Core.Models.Business;
using System;
namespace Bit.Api.Models
@ -7,19 +8,18 @@ namespace Bit.Api.Models
public class OrganizationCreateRequestModel
{
public string Name { get; set; }
public PlanType Plan { get; set; }
// TODO: Billing info for paid plans.
public PlanType PlanType { get; set; }
public string Key { get; set; }
public virtual Organization ToOrganization(Guid userId)
public virtual OrganizationSignup ToOrganizationSignup(User user)
{
var organization = new Organization
return new OrganizationSignup
{
UserId = userId,
Owner = user,
OwnerKey = Key,
Name = Name,
Plan = Plan
Plan = PlanType
};
return organization;
}
}
}