mirror of
https://github.com/bitwarden/server.git
synced 2026-02-16 22:03:15 +08:00
26 lines
569 B
C#
26 lines
569 B
C#
|
|
using Bit.Core.Domains;
|
|||
|
|
using Bit.Core.Enums;
|
|||
|
|
using System;
|
|||
|
|
|
|||
|
|
namespace Bit.Api.Models
|
|||
|
|
{
|
|||
|
|
public class OrganizationCreateRequestModel
|
|||
|
|
{
|
|||
|
|
public string Name { get; set; }
|
|||
|
|
public PlanType Plan { get; set; }
|
|||
|
|
// TODO: Billing info for paid plans.
|
|||
|
|
|
|||
|
|
public virtual Organization ToOrganization(Guid userId)
|
|||
|
|
{
|
|||
|
|
var organization = new Organization
|
|||
|
|
{
|
|||
|
|
UserId = userId,
|
|||
|
|
Name = Name,
|
|||
|
|
Plan = Plan
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
return organization;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|