//
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
//
using Astral.Core.Attributes.EntityAnnotation;
using Astral.Core.Constants;
namespace Astral.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; }
///
/// State of the user's account.
///
[ColumnMapping("userState")]
public UserState State { 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's role.
///
[ColumnMapping("role")]
public UserRole Role { get; set; }
///
/// Group for this user's connections.
///
[ColumnMapping("connectionGroup")]
public Guid ConnectionGroup { get; set; }
///
/// Group for this user's friends.
///
[ColumnMapping("friendGroup")]
public Guid FriendsGroup { get; set; }
}