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

namespace Watcher.Models;

public class User
{
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public int Id { get; set; }  // PK
    public string? OIDC_Id { get; set; } = null!;
    public string Username { get; set; } = null!;
    public string? Email { get; set; }
    public DateTime LastLogin { get; set; }

    [Required]
    public string IdentityProvider { get; set; } = "local";
    
    [Required]
    [DataType(DataType.Password)]
    public String? Password { get; set; } = string.Empty;
}
