mirror of
https://github.com/bitwarden/server.git
synced 2025-07-19 08:30:59 -05:00
Initial db work (#1687)
* Add organization sponsorship databases to all providers * Generalize create and update for database, specialize in code
This commit is contained in:
20
src/Core/Models/EntityFramework/OrganizationSponsorship.cs
Normal file
20
src/Core/Models/EntityFramework/OrganizationSponsorship.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
using AutoMapper;
|
||||
|
||||
namespace Bit.Core.Models.EntityFramework
|
||||
{
|
||||
public class OrganizationSponsorship : Table.OrganizationSponsorship
|
||||
{
|
||||
public virtual Installation Installation { get; set; }
|
||||
public virtual Organization SponsoringOrganization { get; set; }
|
||||
public virtual Organization SponsoredOrganization { get; set; }
|
||||
}
|
||||
|
||||
public class OrganizationSponsorshipMapperProfile : Profile
|
||||
{
|
||||
public OrganizationSponsorshipMapperProfile()
|
||||
{
|
||||
CreateMap<Table.OrganizationSponsorship, OrganizationSponsorship>().ReverseMap();
|
||||
}
|
||||
}
|
||||
}
|
@ -7,15 +7,14 @@ namespace Bit.Core.Models.Table
|
||||
public class OrganizationSponsorship : ITableObject<Guid>
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid InstallationId { get; set; }
|
||||
public Guid? InstallationId { get; set; }
|
||||
[Required]
|
||||
public Guid SponsoringOrganizationId { get; set; }
|
||||
[Required]
|
||||
public Guid SponsoringOrganizationUserId { get; set; }
|
||||
public Guid SponsoringUserId { get; set; }
|
||||
public Guid? SponsoredOrganizationId { get; set; }
|
||||
[MaxLength(256)]
|
||||
public string OfferedToEmail { get; set; }
|
||||
public Guid? SponsoredOrganizationId { get; set; }
|
||||
[Required]
|
||||
public bool CloudSponsor { get; set; }
|
||||
public DateTime? LastSyncDate { get; set; }
|
||||
|
Reference in New Issue
Block a user