# Auto-generated file. Do not edit!
###################################


from typing import Optional
from pydantic import Field
{% for module in modules %}
import {{ module }}
{% endfor %}

class {{ schema.name }}:
    class Meta:
        busobid = "{{ schema.busObId }}"
        statefieldid = "{{ schema.stateFieldId }}"
        firstrecidfield = "{{ schema.firstRecIdField }}"
        recidfields = "{{ schema.recIdFields }}"
        states = {{ schema.states.split(',') }}

    class Config:
        title = "{{ schema.name }}"
        orm_mode = True

    {% for field in fields %}
    {{ field.name }}: {{ field.python_type }} = Field(...,
        {% if field.displayName %}title="{{ field.displayName }}",{% endif %}
        {% if field.description %}description="""{{ field.description }}""",{% endif %}
        cw_fi="{{ field.fieldid_parts['FI'] }}",
        {% if field.category %}cw_category="{{ field.category }}",{% endif %}
        {% if field.details %}cw_details="{{ field.details }}",{% endif %}
        {{ field.pydantic_field_params }})
    {% endfor %}