( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
-- Add ad_generator_saves table for saving user ad configurations
USE looksy_db;
-- Ad Generator Saves table to store saved ad configurations
CREATE TABLE ad_generator_saves (
save_id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT NOT NULL,
ad_name VARCHAR(100) NOT NULL,
template_id VARCHAR(50) NULL, -- Selected template ID
template_data JSON NULL, -- Store template information
style_options JSON NULL, -- Store lighting, background style options
ad_content JSON NULL, -- Store description, CTA, custom CTA
brand_colors JSON NULL, -- Store selected brand colors
generated_ad_image VARCHAR(255) NULL, -- Path to generated ad image
notes TEXT NULL,
is_favorite BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE,
INDEX idx_user_id (user_id),
INDEX idx_created_at (created_at),
INDEX idx_is_favorite (is_favorite)
) ENGINE=InnoDB;