Hi,
Have you worked with approvals before?
If yes, then you would know that a few lines of code is not enough. You need event subscribers and to setup up your approval workflow. And a few more things.
May I suggest that you eventually check this blog post: