namespace WretchedMachines.DataAccess.Entities;

public class User : IEquatable<User>
{
    public required string Name { get; set; }
    public required string Username { get; set; }
    public required string Password { get; set; }
    public required string Email { get; set; }
    public int Role { get; set; }
    public DateTime Created { get; set; }
    public int Id { get; set; }

    public bool Equals(User? other)
    {
        if(Object.ReferenceEquals(other, null)) return false;
        if(Object.ReferenceEquals(this, other)) return true;
        return Name.Equals(other.Name);
    }
}