You can find many different solutions to get your object oriented classes going in Lua but as an experienced Corona developer, I would suggest something like this:
local function createEnemy()
local enemy = display.newImageRect(....)
enemy.isAttacking = false
enemy.valueHealth = 100
...
return enemy
end
It's pretty much what you've discovered with the tables but I wanted to include an example here.