using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ToDoApp.Model { public enum UserStatus { Valid, Invalid } [Index(nameof(Name), IsUnique = true)] public class User { public int Id { get; set; } [Required] public string Name { get; set; } [Required] public string Password { get; set; } [EmailAddress(ErrorMessage = "Invalid email format")] public string? Email { get; set; } public DateTime CreateDate { get; set; } public UserStatus Status { get; set; } } }