I usually use int for storage. The unit of data storage is divided into points. For example, for goods worth one yuan, it is 100 in the database. I think it"s simple and straightforward, and there"s no need to think about compatibility or anything.
do you use this decimal type much in your actual development? How do you usually store currency data?