class SubjectLine(Base, TimestampMixin):
    __tablename__ = "subject_lines"
    id = Column(Integer, primary_key=True)
    user_id = Column(Integer, ForeignKey("users.id", ondelete="CASCADE"), nullable=False, index=True)
    subject = Column(String(500), nullable=False)
    tags = Column(JSON, default=list)
    use_count = Column(Integer, default=0)


class EmailTemplate(Base, TimestampMixin):
    __tablename__ = "html_templates"
    id = Column(Integer, primary_key=True)
    user_id = Column(Integer, ForeignKey("users.id", ondelete="CASCADE"), nullable=False, index=True)
    name = Column(String(250), nullable=False)
    subject_hint = Column(String(500), default="")
    body_html = Column(Text, nullable=False)
    body_text = Column(Text, default="")
    source = Column(String(20), default="paste")  # paste|upload
    is_active = Column(Boolean, default=True, nullable=False)
    sequence_order = Column(Integer, default=0)


15:    BASE_URL: str = "http://localhost:8000"
16:    FRONTEND_BASE_URL: str = "http://localhost:8000"
19:    DATABASE_URL: str = "postgresql+psycopg://mailer:mailer_dev_pw@localhost:5432/bulkmailer"
70:    UNSUBSCRIBE_BASE: str = ""  # defaults to BASE_URL
