
from sqlalchemy import Column, Integer, String, Boolean, DateTime, ForeignKey, Text, Float, Numeric, JSON
from {{ base_package }}.shared.database import Base

# --- Models ---
{% for table in tables %}
class {{ table.class_name }}(Base):
    __tablename__ = "{{ table.name }}"
    {% for col in table.columns -%}
    {{ col.name }} = Column({{ col.type }}{% if col.primary_key %}, primary_key=True, index=True{% endif %}{% if not col.nullable and not col.primary_key %}, nullable=False{% endif %})
    {% endfor %}

{% endfor %}
