refactor: split shared models and DTOs
This commit is contained in:
31
src/ASTRAIN.Shared/Models/User.cs
Normal file
31
src/ASTRAIN.Shared/Models/User.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ASTRAIN.Shared.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an application user identified by an 8-character key.
|
||||
/// </summary>
|
||||
public class User
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the unique 8-character user identifier.
|
||||
/// </summary>
|
||||
[Key]
|
||||
[MaxLength(8)]
|
||||
public string Id { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the creation timestamp in UTC.
|
||||
/// </summary>
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the exercises owned by this user.
|
||||
/// </summary>
|
||||
public List<Exercise> Exercises { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the routines owned by this user.
|
||||
/// </summary>
|
||||
public List<Routine> Routines { get; set; } = new();
|
||||
}
|
||||
Reference in New Issue
Block a user