2020-07-07 12:01:34 -04:00
|
|
|
|
using System;
|
|
|
|
|
|
using Bit.Core.Enums;
|
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
using Newtonsoft.Json.Converters;
|
|
|
|
|
|
using Newtonsoft.Json.Serialization;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Models.Business
|
|
|
|
|
|
{
|
|
|
|
|
|
[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
|
|
|
|
|
|
public class ReferenceEvent
|
|
|
|
|
|
{
|
|
|
|
|
|
public ReferenceEvent() { }
|
|
|
|
|
|
|
|
|
|
|
|
public ReferenceEvent(ReferenceEventType type, IReferenceable source)
|
|
|
|
|
|
{
|
|
|
|
|
|
Type = type;
|
|
|
|
|
|
if (source != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
Source = source.IsUser() ? ReferenceEventSource.User : ReferenceEventSource.Organization;
|
|
|
|
|
|
Id = source.Id;
|
2020-07-20 15:19:46 -04:00
|
|
|
|
ReferenceData = source.ReferenceData;
|
2020-07-07 12:01:34 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
|
|
|
|
public ReferenceEventType Type { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
|
|
|
|
public ReferenceEventSource Source { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
|
|
2020-07-20 15:19:46 -04:00
|
|
|
|
public string ReferenceData { get; set; }
|
2020-07-07 12:01:34 -04:00
|
|
|
|
|
|
|
|
|
|
public DateTime EventDate { get; set; } = DateTime.UtcNow;
|
|
|
|
|
|
|
2020-07-15 12:38:45 -04:00
|
|
|
|
public int? Users { get; set; }
|
|
|
|
|
|
|
2020-07-07 12:01:34 -04:00
|
|
|
|
public bool? EndOfPeriod { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string PlanName { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public PlanType? PlanType { get; set; }
|
|
|
|
|
|
|
2021-08-10 14:38:58 -04:00
|
|
|
|
public string OldPlanName { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public PlanType? OldPlanType { get; set; }
|
|
|
|
|
|
|
2021-05-17 09:43:02 -05:00
|
|
|
|
public int? Seats { get; set; }
|
2021-08-10 14:38:58 -04:00
|
|
|
|
public int? PreviousSeats { get; set; }
|
2020-07-07 12:01:34 -04:00
|
|
|
|
|
|
|
|
|
|
public short? Storage { get; set; }
|
2021-02-25 13:40:26 -05:00
|
|
|
|
|
|
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
|
|
|
|
public SendType? SendType { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public int? MaxAccessCount { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public bool? HasPassword { get; set; }
|
2021-08-11 12:44:30 -04:00
|
|
|
|
|
|
|
|
|
|
public string EventRaisedByUser { get; set; }
|
|
|
|
|
|
|
2021-08-17 13:12:55 -04:00
|
|
|
|
public bool? SalesAssistedTrialStarted { get; set; }
|
2020-07-07 12:01:34 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|