1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-09 11:54:41 -05: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,47 @@
using System;
using Bit.Core.Models.Table;
namespace Bit.Core.Models.Api
{
public class OrganizationResponseModel : ResponseModel
{
public OrganizationResponseModel(Organization organization, string obj = "organization")
: base(obj)
{
if(organization == null)
{
throw new ArgumentNullException(nameof(organization));
}
Id = organization.Id.ToString();
Name = organization.Name;
Plan = organization.Plan;
PlanType = organization.PlanType;
PlanTrial = organization.PlanTrial;
MaxUsers = organization.MaxUsers;
}
public string Id { get; set; }
public string Name { get; set; }
public string Plan { get; set; }
public Core.Enums.PlanType PlanType { get; set; }
public bool PlanTrial { get; set; }
public short MaxUsers { get; set; }
}
public class OrganizationExtendedResponseModel : OrganizationResponseModel
{
public OrganizationExtendedResponseModel(Organization organization, OrganizationUser organizationUser)
: base(organization, "organizationExtended")
{
if(organizationUser == null)
{
throw new ArgumentNullException(nameof(organizationUser));
}
Key = organizationUser.Key;
}
public string Key { get; set; }
}
}