using Galaeth.Core.Attributes.EntityAnnotation;
using Galaeth.Core.Constants;
namespace Galaeth.Core.Entities;
///
/// User entity.
///
[TableMapping("users")]
public class User
{
///
/// User id.
///
[ColumnMapping("id")]
[PrimaryKey]
public Guid Id { get; set; }
///
/// When the user was created.
///
[ColumnMapping("createdAt")]
public DateTime CreatedAt { get; set; }
///
/// When the user's entity was last updated.
///
[ColumnMapping("updatedAt")]
public DateTime UpdatedAt { get; set; }
///
/// The user's name.
///
[ColumnMapping("username")]
public string Username { get; set; }
///
/// The user's email address.
///
[ColumnMapping("email")]
public string EmailAddress { get; set; }
///
/// Authentication hash.
///
[ColumnMapping("authHash")]
public string PasswordHash { get; set; }
///
/// Authentication salt.
///
[ColumnMapping("authSalt")]
public string PasswordSalt { get; set; }
///
/// The ip address of the creator.
///
[ColumnMapping("creatorIp")]
public string CreatorIp { get; set; }
///
/// When the user last logged in.
///
[ColumnMapping("lastLoggedIn")]
public DateTime LastLoggedIn { get; set; }
///
/// The user account's role.
///
[ColumnMapping("role")]
public UserRole Role { get; set; }
///
/// State of the user's account.
///
[ColumnMapping("state")]
public UserState State { get; set; }
}