Smart contract - Staking with lock choose 1 month, 3 month or 1 year

Hi ! I'm looking for a smart contract where I can transfert my token to the SC and then users can stake tokens to earn it but each user can choose the period of lock : 1month, 3 month or 1 year.
The multiplicator of rewards is also based on the time of lock :
1 month : rewards0.5
3 month : rewards
0.8
1 year : rewards*1.5

regards,