title: Get the field name of a class without hardcoding
body: <p>I have a Pydantic model class like this</p>
  
  <pre><code>class User(BaseModel):
     username: str
     firstname: str
     lastname: str
  </code></pre>
  
  <p>Now, I want to be able to reference "username" without hardcoding (like how I was able to reference the class name)</p>
  
  <pre><code>setup_index(User.__name__, "username") 
  </code></pre>
  
  <p>Is there any way without going through the code generation route ?</p>