---
to: generated/src/{{ class_name | snake_case }}.rs
rdf:
  - ontology.ttl
sparql:
  class_properties: |
    PREFIX ex: <http://example.org/maturity-matrix/level2#>
    SELECT ?property ?label ?range WHERE {
      ?property rdfs:domain ex:{{ class_name }} .
      ?property rdfs:label ?label .
      OPTIONAL { ?property rdfs:range ?range }
    }
    ORDER BY ?property
vars:
  class_name: User
---

// Level 2: Generated Module for {{ class_name }}
// AUTO-GENERATED from ontology.ttl - DO NOT EDIT

pub struct {{ class_name }} {
{% for row in sparql_results.class_properties %}
    pub {{ row.property | split("#") | last | snake_case }}: {{ row.range | rust_type }},
{% endfor %}
}

impl {{ class_name }} {
    pub fn new() -> Self {
        Self {
{% for row in sparql_results.class_properties %}
            {{ row.property | split("#") | last | snake_case }}: Default::default(),
{% endfor %}
        }
    }
}

