34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
|
using System;
|
||
|
using app.Model.DTOs;
|
||
|
|
||
|
namespace app.Model
|
||
|
{
|
||
|
public class AuthUser : IAutoGenerateDateFields
|
||
|
{
|
||
|
public long Id { get; set; }
|
||
|
public string FirstName { get; set; }
|
||
|
public string LastName { get; set; }
|
||
|
public string EMail { get; set; }
|
||
|
public string Password { get; set; }
|
||
|
public AuthRoles AuthRole { get; set; }
|
||
|
public string RefreshToken { get; set; }
|
||
|
public string ConfirmationId { get; set; }
|
||
|
public string ForgotPasswordId { get; set; }
|
||
|
public DateTime RefreshTokenExpiryTime { get; set; }
|
||
|
public DateTimeOffset CreatedOn { get; set; }
|
||
|
public DateTimeOffset LastModifiedOn { get; set; }
|
||
|
|
||
|
public AuthUserDTO ToAuthUserDTO()
|
||
|
{
|
||
|
return new AuthUserDTO
|
||
|
{
|
||
|
Id = this.Id,
|
||
|
FirstName = this.FirstName,
|
||
|
LastName = this.LastName,
|
||
|
EMail = this.EMail,
|
||
|
IsConfirmed = this.ConfirmationId == null,
|
||
|
AuthRole = this.AuthRole
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
}
|