// Account to Entities Account func AccToEnt(account Account) entities.Account { a := entities.Account{} a.Name = account.Name a.Email = account.Email a.Phone = account.Phone a.Password = account.Password a.Type = account.Type a.Date = account.Date return a }
// Modify Account - old and new changes func ModifyAccount(oldAcc *entities.Account, newAcc entities.Account) { if newAcc.Email != "" { oldAcc.Email = newAcc.Email } if newAcc.Phone != "" { oldAcc.Phone = newAcc.Phone } if newAcc.Type != "" { oldAcc.Type = newAcc.Type } if newAcc.Password != "" { oldAcc.Password = newAcc.Password } }