// SMM System Types and Enums

// Campaign Status Enum
export const CampaignStatus = {
    PLANNED: 'PLANNED',
    ACTIVE: 'ACTIVE',
    COMPLETED: 'COMPLETED'
};

// Channel Type Enum
export const ChannelType = {
    TELEGRAM: 'TELEGRAM',
    VK: 'VK',
    INSTAGRAM: 'INSTAGRAM'
};

// Content Status Enum
export const ContentStatus = {
    DRAFT: 'DRAFT',
    PENDING_APPROVAL: 'PENDING_APPROVAL',
    APPROVED: 'APPROVED',
    PUBLISHED: 'PUBLISHED',
    FAILED: 'FAILED'
};

// Campaign DTO
export class CampaignDto {
    constructor(data = {}) {
        this.id = data.id;
        this.name = data.name;
        this.goal = data.goal;
        this.budget = data.budget;
        this.startAt = data.startAt;
        this.endAt = data.endAt;
        this.status = data.status;
    }
}

// Channel DTO
export class ChannelDto {
    constructor(data = {}) {
        this.id = data.id;
        this.name = data.name;
        this.type = data.type;
        this.apiKeyRef = data.apiKeyRef;
        this.isActive = data.isActive;
    }
}

// Content Queue DTO
export class ContentQueueDto {
    constructor(data = {}) {
        this.id = data.id;
        this.campaignId = data.campaignId;
        this.locale = data.locale;
        this.topic = data.topic;
        this.postDraft = data.postDraft;
        this.assetsRefs = data.assetsRefs;
        this.scheduledAt = data.scheduledAt;
        this.priority = data.priority;
        this.status = data.status;
    }
}

// Message DTO
export class MessageDto {
    constructor(data = {}) {
        this.id = data.id;
        this.channelId = data.channelId;
        this.contentId = data.contentId;
        this.externalId = data.externalId;
        this.url = data.url;
        this.postedAt = data.postedAt;
    }
}

// Publishing Result DTO
export class PublishingResultDto {
    constructor(data = {}) {
        this.success = data.success;
        this.message = data.message;
        this.data = data.data;
    }
}

// Analytics Result DTO
export class AnalyticsResultDto {
    constructor(data = {}) {
        this.success = data.success;
        this.message = data.message;
    }
}

// Error Response DTO
export class ErrorResponseDto {
    constructor(data = {}) {
        this.timestamp = data.timestamp;
        this.status = data.status;
        this.error = data.error;
        this.message = data.message;
        this.path = data.path;
    }
}
