feat: all project setup

This commit is contained in:
ivannoskov
2025-11-10 12:07:24 +03:00
parent fbfd7719bb
commit b0a9934220
99 changed files with 19597 additions and 0 deletions

View File

@@ -0,0 +1,95 @@
import { ExternalChannel, ExternalChannelDetail } from "@/lib/types/api";
// ============================================================================
// Mock External Channels Data
// ============================================================================
export const mockExternalChannels: ExternalChannel[] = [
{
id: "ec1",
telegram_id: -1001111111111,
title: "Канал о Маркетинге",
username: "marketing_pro",
link: "https://t.me/marketing_pro",
subscribers_count: 50000,
description: "Лучшие практики маркетинга",
created_at: "2024-01-05T10:00:00.000Z",
updated_at: "2024-01-05T10:00:00.000Z",
target_channels: ["tc1", "tc2"],
total_purchases: 5,
avg_cpf: 42.5,
avg_cpm: 850.0,
},
{
id: "ec2",
telegram_id: -1002222222222,
title: "Бизнес и Стартапы",
username: "business_startups",
link: "https://t.me/business_startups",
subscribers_count: 120000,
description: "Новости мира бизнеса",
created_at: "2024-01-08T11:00:00.000Z",
updated_at: "2024-01-08T11:00:00.000Z",
target_channels: ["tc1"],
total_purchases: 8,
avg_cpf: 55.8,
avg_cpm: 1200.0,
},
{
id: "ec3",
telegram_id: -1003333333333,
title: "IT и Технологии",
username: "it_tech_news",
link: "https://t.me/it_tech_news",
subscribers_count: 85000,
description: "Все о новых технологиях",
created_at: "2024-01-12T09:00:00.000Z",
updated_at: "2024-01-12T09:00:00.000Z",
target_channels: ["tc1", "tc2"],
total_purchases: 3,
avg_cpf: 38.2,
avg_cpm: 750.0,
},
{
id: "ec4",
telegram_id: null,
title: "Крипто Инвестиции",
username: "crypto_invest",
link: "https://t.me/crypto_invest",
subscribers_count: 200000,
description: null,
created_at: "2024-02-01T10:00:00.000Z",
updated_at: "2024-02-01T10:00:00.000Z",
target_channels: ["tc2"],
total_purchases: 2,
avg_cpf: 68.5,
avg_cpm: 1500.0,
},
{
id: "ec5",
telegram_id: -1005555555555,
title: "Продажи и Переговоры",
username: "sales_expert",
link: "https://t.me/sales_expert",
subscribers_count: 35000,
description: "Экспертиза в продажах",
created_at: "2024-02-10T14:00:00.000Z",
updated_at: "2024-02-10T14:00:00.000Z",
target_channels: ["tc1"],
total_purchases: 4,
avg_cpf: 45.0,
avg_cpm: 900.0,
},
];
export const getMockExternalChannelDetail = (
id: string
): ExternalChannelDetail | null => {
const channel = mockExternalChannels.find((c) => c.id === id);
if (!channel) return null;
return {
...channel,
purchases: [], // Will be populated from purchases mock
};
};