How to add "Properties" to items?

Say I have an item class, and I’d like to add properties to each item. For example, one item could have the “sharp” attribute, another could have the “blunt” attribute, say a water bottle could have the attribute “water” and etc.

If you have played the STALKER CoP misery mod, you will know what I am talking about. Say I want to clean my weapon, and there is an item that has the “cloth” attribute. I can use said item to add a small repair bonus.

What would be the best way to go about doing this?

Write a script and attach it to all items which should have attributes.

In that script, define a public static enum with your desired attributes. I call it ‘Types’.
Each script should have a public variable of that enum type to identify a certain instance. I call it ‘attribute’.

So you can check like this:

var attributeScript = item.GetComponent<Attribute>();

if (attributeScript != null & attributeScript.attribute == Attribute.Types.SHARP) {
    // sharp item found
}