// Type definitions matching PostgreSQL schema
// These mirror the database tables for type-safe queries

export interface Site {
    id: string;
    domain: string;
    status: 'active' | 'inactive' | 'pending';
    site_url: string;
    site_wpjson: string;
    created_at: Date;
    updated_at: Date;
}

export interface Article {
    id: string;
    site_id: string;
    title: string;
    content: string;
    status: 'queued' | 'processing' | 'qc' | 'approved' | 'published';
    is_published: boolean;
    created_at: Date;
    updated_at: Date;
}

export interface Campaign {
    id: string;
    name: string;
    status: 'active' | 'paused' | 'completed';
    target_sites: string[];
    created_at: Date;
    updated_at: Date;
}

export interface GenerationJob {
    id: string;
    site_id: string;
    campaign_id?: string;
    status: 'pending' | 'processing' | 'completed' | 'failed';
    total_count: number;
    current_offset: number;
    error_message?: string;
    created_at: Date;
    updated_at: Date;
}

export interface FilterOptions {
    limit?: number;
    offset?: number;
    status?: string;
    search?: string;
    siteId?: string;
    campaignId?: string;
}

export interface PaginationResult<T> {
    data: T[];
    total: number;
    limit: number;
    offset: number;
    hasMore: boolean;
}
