BotSharp/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/UserDocument.cs

39 lines
1.1 KiB
C#
Raw Normal View History

2024-01-31 19:57:54 +00:00
using BotSharp.Abstraction.Users.Models;
2023-09-01 22:33:36 +00:00
namespace BotSharp.Plugin.MongoStorage.Collections;
2023-08-28 05:28:14 +00:00
public class UserDocument : MongoBase
2023-08-26 04:41:01 +00:00
{
2024-01-05 03:20:50 +00:00
public string UserName { get; set; }
2023-08-28 05:28:14 +00:00
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
public string Salt { get; set; }
public string Password { get; set; }
2024-01-31 15:15:41 +00:00
public string Source { get; set; } = "internal";
2023-09-06 04:41:49 +00:00
public string? ExternalId { get; set; }
2023-11-14 05:37:04 +00:00
public string Role { get; set; }
2024-05-26 01:34:29 +00:00
public string? VerificationCode { get; set; }
public bool Verified { get; set; }
2023-08-28 05:28:14 +00:00
public DateTime CreatedTime { get; set; }
public DateTime UpdatedTime { get; set; }
2024-01-31 19:57:54 +00:00
public User ToUser()
{
return new User
{
Id = Id,
UserName = UserName,
FirstName = FirstName,
LastName = LastName,
Email = Email,
Password = Password,
Salt = Salt,
Source = Source,
ExternalId = ExternalId,
2024-05-26 01:34:29 +00:00
Role = Role,
VerificationCode = VerificationCode,
Verified = Verified,
2024-01-31 19:57:54 +00:00
};
}
2023-08-28 05:28:14 +00:00
}