mirror of
https://github.com/bitwarden/server
synced 2025-12-24 04:03:25 +00:00
* Add PlanSponsorshipType to static store * Add sponsorship type to token and creates sponsorship * PascalCase properties * Require sponsorship for remove * Create subscription sponsorship helper class * Handle Sponsored subscription changes * Add sponsorship id to subscription metadata * Make sponsoring references nullable This state indicates that a sponsorship has lapsed, but was not able to be reverted for billing reasons * WIP: Validate and remove subscriptions * Update sponsorships on organization and org user delete * Add friendly name to organization sponsorship
32 lines
1.0 KiB
C#
32 lines
1.0 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using Bit.Core.Enums;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.Core.Models.Table
|
|
{
|
|
public class OrganizationSponsorship : ITableObject<Guid>
|
|
{
|
|
public Guid Id { get; set; }
|
|
public Guid? InstallationId { get; set; }
|
|
public Guid? SponsoringOrganizationId { get; set; }
|
|
public Guid? SponsoringOrganizationUserId { get; set; }
|
|
public Guid? SponsoredOrganizationId { get; set; }
|
|
[MaxLength(256)]
|
|
public string FriendlyName { get; set; }
|
|
[MaxLength(256)]
|
|
public string OfferedToEmail { get; set; }
|
|
public PlanSponsorshipType? PlanSponsorshipType { get; set; }
|
|
[Required]
|
|
public bool CloudSponsor { get; set; }
|
|
public DateTime? LastSyncDate { get; set; }
|
|
public byte TimesRenewedWithoutValidation { get; set; }
|
|
public DateTime? SponsorshipLapsedDate { get; set; }
|
|
|
|
public void SetNewId()
|
|
{
|
|
Id = CoreHelpers.GenerateComb();
|
|
}
|
|
}
|
|
}
|