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

namespace Watcher.Models;

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

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

    [EmailAddress]
    public string? Email { get; set; }

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

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