Files
server/src/Api/Models/Request/InstallationRequestModel.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
558 B
C#
Raw Normal View History

2021-12-14 15:05:07 +00:00
using System.ComponentModel.DataAnnotations;
using Bit.Core.Models.Table;
using Bit.Core.Utilities;
2017-08-15 16:31:19 -04:00
2021-12-14 15:05:07 +00:00
namespace Bit.Api.Models.Request
2017-08-15 16:31:19 -04:00
{
public class InstallationRequestModel
{
[Required]
[EmailAddress]
[StringLength(256)]
2017-08-15 16:31:19 -04:00
public string Email { get; set; }
public Installation ToInstallation()
{
return new Installation
{
2021-12-14 15:05:07 +00:00
Key = CoreHelpers.SecureRandomString(20),
2017-08-15 16:31:19 -04:00
Email = Email,
Enabled = true
};
}
}
}