from sqlalchemy import Column, Integer, String, Text, Enum
import enum
from app.db.base import Base

class EmailType(str, enum.Enum):
    REGISTRATION = "REGISTRATION"
    PASSWORD_RESET = "PASSWORD_RESET"
    GDPR_NOTICE = "GDPR_NOTICE"

class EmailTemplate(Base):
    __tablename__ = "email_templates"
    __table_args__ = {"schema": "data"}

    id = Column(Integer, primary_key=True, index=True)
    type = Column(Enum(EmailType), unique=True, index=True)
    subject = Column(String(255), nullable=False)
    body_html = Column(Text, nullable=False) # Adminról szerkeszthető HTML tartalom
