how to make an item enchantable with base game enchants (no snapshots, 1.21.1)

I am trying to make a new item with different enchants but I also wanna make it be able to get mending and unbreaking with an anvil in survival (dummy item is command block), how can I do it?
Continue to help post