I wouldn't attach the prefix to the id property on the card itself, rather just as the storage key you pass to the database. You'll save some logic up above where you have to parse the id back out with substr and parseInt