88 lines
2.1 KiB
C#
88 lines
2.1 KiB
C#
|
// <copyright file="User.cs" company="alveus.dev">
|
||
|
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
|
||
|
// </copyright>
|
||
|
|
||
|
using Astral.Core.Attributes.EntityAnnotation;
|
||
|
|
||
|
namespace Astral.Core.Entities;
|
||
|
|
||
|
/// <summary>
|
||
|
/// User entity.
|
||
|
/// </summary>
|
||
|
[TableMapping("users")]
|
||
|
public class User
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// User id.
|
||
|
/// </summary>
|
||
|
[ColumnMapping("id")]
|
||
|
[PrimaryKey]
|
||
|
public Guid Id { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// When the user was created.
|
||
|
/// </summary>
|
||
|
[ColumnMapping("createdAt")]
|
||
|
public DateTime CreatedAt { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// When the user's entity was last updated.
|
||
|
/// </summary>
|
||
|
[ColumnMapping("updatedAt")]
|
||
|
public DateTime UpdatedAt { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// The user's name.
|
||
|
/// </summary>
|
||
|
[ColumnMapping("username")]
|
||
|
public string Username { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// The user's email address.
|
||
|
/// </summary>
|
||
|
[ColumnMapping("email")]
|
||
|
public string EmailAddress { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Authentication hash.
|
||
|
/// </summary>
|
||
|
[ColumnMapping("authHash")]
|
||
|
public string PasswordHash { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Authentication salt.
|
||
|
/// </summary>
|
||
|
[ColumnMapping("authSalt")]
|
||
|
public string PasswordSalt { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// The ip address of the creator.
|
||
|
/// </summary>
|
||
|
[ColumnMapping("creatorIp")]
|
||
|
public string CreatorIp { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// When the user last logged in.
|
||
|
/// </summary>
|
||
|
[ColumnMapping("lastLoggedIn")]
|
||
|
public DateTime LastLoggedIn { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// The user's role.
|
||
|
/// </summary>
|
||
|
[ColumnMapping("role")]
|
||
|
public string UserRole { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Group for this user's connections.
|
||
|
/// </summary>
|
||
|
[ColumnMapping("connectionGroup")]
|
||
|
public Guid ConnectionGroup { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Group for this user's friends.
|
||
|
/// </summary>
|
||
|
[ColumnMapping("friendGroup")]
|
||
|
public Guid FriendsGroup { get; set; }
|
||
|
}
|