Creating a Unique random string for Discount Code

as suggested by @daniel10 , this solution makes sense. Thanks