<%
    model_name = entity.name.capitalize()
%>
from sqlalchemy import Column, Integer, String
from ..database import Base

class ${model_name}(Base):
    __tablename__ = "${entity.name.lower()}s"

    id = Column(Integer, primary_key=True, index=True)
    % for field in entity.fields:
    % if field['type'] == 'String':
    ${field['name']} = Column(String)
    % elif field['type'] == 'Long':
    ${field['name']} = Column(Integer)
    % elif field['type'] == 'Boolean':
    ${field['name']} = Column(Boolean)
    % else:
    ${field['name']} = Column(String)  # 默认使用String类型
    % endif
    % endfor