init
This commit is contained in:
25
watcher-monitoring/Models/User.cs
Normal file
25
watcher-monitoring/Models/User.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user