The deal has been agreed between the European Union and the UK and also includes elements on security and defence