api e token con ck in db

This commit is contained in:
Riccardo Usardi committed 2025-07-09 18:51:18 +02:00
1 parent a172f05269
commit 2db9525570
18 files changed
+570 -161

No files matched your search

+12 -1
View File
@@ -1,4 +1,6 @@
namespace uWine.Core.Domain.Entities
using MySqlConnector;
namespace uWine.Core.Domain.Entities
{
public class User
{
@@ -8,5 +10,14 @@
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),
};
}
}
}