""" Settings model for Podcastrr. """ from app.models.database import db class Settings(db.Model): """ Model representing application settings. """ __tablename__ = 'settings' id = db.Column(db.Integer, primary_key=True) download_path = db.Column(db.String(512), nullable=False) naming_format = db.Column(db.String(255), nullable=False, default="{podcast_title}/{episode_title}") auto_download = db.Column(db.Boolean, default=False) max_downloads = db.Column(db.Integer, default=5) delete_after_days = db.Column(db.Integer, default=30) def __repr__(self): return f'' def to_dict(self): """ Convert settings to dictionary for API responses. """ return { 'id': self.id, 'download_path': self.download_path, 'naming_format': self.naming_format, 'auto_download': self.auto_download, 'max_downloads': self.max_downloads, 'delete_after_days': self.delete_after_days }