You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
744 B

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; }
}
}