1
0
mirror of https://github.com/bitwarden/server synced 2025-12-15 07:43:54 +00:00
Files
server/src/Core/Tools/Entities/Send.cs
Daniel James Smith 4e7b9d2edd [PM-328] Move files for team-tools (#2857)
* Extract Import-Api endpoints into separate controller

Moved ciphers/import and ciphers/import-organization into new ImportController
Paths have been kept intact for now (no changes on clients needed)
Moved request-models used for import into tools-subfolder

* Update CODEOWNERS for team-tools-dev

* Move HibpController (reports) to tools

* Moving files related to Send

* Moving files related to ReferenceEvent

* Removed unneeded newline
2023-04-18 14:05:17 +02:00

32 lines
992 B
C#

using System.ComponentModel.DataAnnotations;
using Bit.Core.Entities;
using Bit.Core.Tools.Enums;
using Bit.Core.Utilities;
namespace Bit.Core.Tools.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();
}
}