using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace watcher_monitoring.Models;

public class User
{
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public int Id { get; set; }

    [Required]
    [StringLength(50)]
    public required string Username { get; set; } = null!;

    [Required]
    [EmailAddress]
    public required string Email { get; set; }

    public DateTime LastLogin { get; set; } = DateTime.UtcNow;

    [Required]
    [DataType(DataType.Password)]
    public required string Password { get; set; }
}
