Changed if else to switch case in comment model, used name of the table instead of the constant in user model