Files
uWine/uWine.Core.Domain/Entities/User.cs
T

24 lines
643 B
C#

using MySqlConnector;
namespace uWine.Core.Domain.Entities
{
public class User
{
public int Id { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public Role Role { get; set; }
public bool Active { get; set; }
public List<Owner> Owners { get; set; }
public static User LoginUser(MySqlDataReader reader)
{
return new User
{
Id = reader.GetInt32("id"),
Username = reader.GetString("username"),
Role = Role.FromRecord(reader),
};
}
}
}