from oarepo_runtime.cf import CustomFields, InlinedCustomFields

class {{ vars.record|class_header }}:
{% for cf in vars.custom_fields %}
{%if cf.element %}
    {{cf.element}} = CustomFields(
        "{{cf.config}}",
        "{{cf.element}}",
        clear_none=True,
        create_if_missing=True,
    )
{% else %}
    inlined_custom_fields = InlinedCustomFields("{{cf.config}}")
{% endif %}
{% endfor %}
