Lock permission to edit a comment

Hi team,
I want to set a rule a my doctype that the user just can change their comment in 1 day. After that time, the comment are locked and no one can edit it.
Do u guy know how to set this?
Thanks a lot