namespace FastBlog.Core.Models.Users;

public class User
{
    public int Id { get; set; }
    public string Username { get; set; } = null!;
    public bool Deleted { get; set; }

    public static User? FromUserPassword(UserPassword? userDb)
    {
        if (userDb == null) return null;
        return new User
        {
            Id = userDb.Id,
            Username = userDb.Username,
            Deleted = userDb.Deleted
        };
    }
}