Adding index and max length to user tabel + minor fixes

This commit is contained in:
2025-03-13 00:53:08 +01:00
parent 61b9c732bc
commit 962de4df9e
10 changed files with 409 additions and 34 deletions

View File

@@ -1,12 +1,18 @@
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using Microsoft.EntityFrameworkCore;
namespace BasicDotnetTemplate.MainProject.Models.Database.SqlServer;
public class User : Base
{
[MaxLength(200)]
public required string Username { get; set; }
[MaxLength(200)]
public required string FirstName { get; set; }
[MaxLength(200)]
public required string LastName { get; set; }
[MaxLength(200)]
public required string Email { get; set; }
public required string PasswordSalt { get; set; }
public required string PasswordHash { get; set; }