mirror of
https://github.com/bitwarden/server.git
synced 2025-05-29 23:34:53 -05:00
32 lines
1.0 KiB
C#
32 lines
1.0 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using Bit.Core.Enums;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.Core.Entities
|
|
{
|
|
public class Send : ITableObject<Guid>
|
|
{
|
|
public Guid Id { get; set; }
|
|
public Guid? UserId { get; set; }
|
|
public Guid? OrganizationId { get; set; }
|
|
public SendType Type { get; set; }
|
|
public string Data { get; set; }
|
|
public string Key { get; set; }
|
|
[MaxLength(300)]
|
|
public string Password { get; set; }
|
|
public int? MaxAccessCount { get; set; }
|
|
public int AccessCount { get; set; }
|
|
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;
|
|
public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;
|
|
public DateTime? ExpirationDate { get; set; }
|
|
public DateTime DeletionDate { get; set; }
|
|
public bool Disabled { get; set; }
|
|
public bool? HideEmail { get; set; }
|
|
|
|
public void SetNewId()
|
|
{
|
|
Id = CoreHelpers.GenerateComb();
|
|
}
|
|
}
|
|
}
|