Files
HopFrame/debug/TestApplication/Models/User.cs
Leon Hoppe e9e9fbf5e9
All checks were successful
HopFrame CI / build (push) Successful in 55s
HopFrame CI / test (push) Successful in 1m6s
Added sorting
2026-02-25 21:25:34 +01:00

32 lines
801 B
C#

using System.ComponentModel.DataAnnotations;
namespace TestApplication.Models;
public class User {
[Key]
public Guid Id { get; } = Guid.CreateVersion7();
public int Index { get; set; }
[EmailAddress, MaxLength(25)]
public required string Email { get; set; }
[MaxLength(25)]
public required string Username { get; set; }
[MaxLength(64)]
public required string Password { get; set; }
[MaxLength(25)]
public required string FirstName { get; set; }
[MaxLength(25)]
public required string LastName { get; set; }
[MaxLength(255)]
public string? Description { get; set; }
public required DateOnly Birth { get; set; } = DateOnly.FromDateTime(DateTime.Today);
public List<Post> Posts { get; set; } = new();
}