What is neat way of implement equip function?

So there are many RPG games.

At almost all games, now equipment and equip functions are normal and essential in game system.

So, how to implement this?

I did like,

  1. First make itemgeneral class, and equipmentgeneral class inherit this.
    And weapongeneral, armorgeneral inherit equipmentgeneral.
    And then make bunch of specific each class like shortsword, shieldsmall, etc represented each specific equipment.

  2. Make virtual Equip function inside EquipmentGeneral abstract class. Like,
    public virtual void ApplyEquip(AllyClass who, EquipType where)
    {
    So each equipment itself will have Equip function.

Is this right way?

My approach was to have an EquipmentInfo class that amongst other things held details of which equipment item it related to, the model to show on the character when equipped and the type of equipment it is (helm, glove, shoe, etc.).

I also made an EquipmentManager class for the character, which uses the above class to work out what and where to show the equipment on the character.

To help with managing all the equipment in the game, I implemented the EquipmentInfo as a ScriptableObject and made a custom editor window to handle creation, deleting and organisation of all the EquipmentInfo assets.