72 lines
2.6 KiB
TypeScript
72 lines
2.6 KiB
TypeScript
import { Creative, CreativeDetail } from "@/lib/types/api";
|
||
import { mockTargetChannels } from "./channels";
|
||
|
||
// ============================================================================
|
||
// Mock Creatives Data
|
||
// ============================================================================
|
||
|
||
export const mockCreatives: Creative[] = [
|
||
{
|
||
id: "cr1",
|
||
name: 'Креатив "Присоединяйся"',
|
||
text: "🔥 Присоединяйся к нашему сообществу!\n\nУзнавай первым о новых возможностях и фишках.\n\n👉 {link}",
|
||
target_channel_id: "tc1",
|
||
is_archived: false,
|
||
created_at: "2024-01-15T10:00:00.000Z",
|
||
updated_at: "2024-01-15T10:00:00.000Z",
|
||
target_channel: mockTargetChannels[0],
|
||
total_purchases: 10,
|
||
total_subscriptions: 850,
|
||
avg_cpf: 42.3,
|
||
},
|
||
{
|
||
id: "cr2",
|
||
name: 'Креатив "Эксклюзив"',
|
||
text: "⭐ Эксклюзивный контент только для подписчиков!\n\nНе упусти возможность быть в курсе всех трендов.\n\nПереходи: {link}",
|
||
target_channel_id: "tc1",
|
||
is_archived: false,
|
||
created_at: "2024-01-20T12:00:00.000Z",
|
||
updated_at: "2024-01-20T12:00:00.000Z",
|
||
target_channel: mockTargetChannels[0],
|
||
total_purchases: 5,
|
||
total_subscriptions: 400,
|
||
avg_cpf: 48.5,
|
||
},
|
||
{
|
||
id: "cr3",
|
||
name: 'Креатив "Обучение"',
|
||
text: "📚 Хочешь научиться зарабатывать больше?\n\nПодписывайся на канал с проверенными методиками!\n\n{link}",
|
||
target_channel_id: "tc2",
|
||
is_archived: false,
|
||
created_at: "2024-02-05T09:00:00.000Z",
|
||
updated_at: "2024-02-05T09:00:00.000Z",
|
||
target_channel: mockTargetChannels[1],
|
||
total_purchases: 8,
|
||
total_subscriptions: 450,
|
||
avg_cpf: 52.3,
|
||
},
|
||
{
|
||
id: "cr4",
|
||
name: "Старый креатив (архив)",
|
||
text: "Устаревший текст с предложением. {link}",
|
||
target_channel_id: "tc1",
|
||
is_archived: true,
|
||
created_at: "2023-12-01T10:00:00.000Z",
|
||
updated_at: "2024-01-10T15:00:00.000Z",
|
||
target_channel: mockTargetChannels[0],
|
||
total_purchases: 2,
|
||
total_subscriptions: 80,
|
||
avg_cpf: 75.0,
|
||
},
|
||
];
|
||
|
||
export const getMockCreativeDetail = (id: string): CreativeDetail | null => {
|
||
const creative = mockCreatives.find((c) => c.id === id);
|
||
if (!creative) return null;
|
||
|
||
return {
|
||
...creative,
|
||
purchases: [], // Will be populated from purchases mock
|
||
};
|
||
};
|