Resource entity and repository.