added ExternalId in Resource model