Files
afrov2/types.ts
streaper2 887030ee47 synchronisation du contenu avec la DB et amélioration du CMS
- Migration du blog et des interviews des données mockées vers PostgreSQL (Prisma).
- Refonte des pages publiques en Server Components pour de meilleures performances/SEO.
- Intégration d'un éditeur de texte riche (React Quill) avec titres H1-H6 et séparateurs.
- Correction des erreurs de validation Prisma liées aux paramètres asynchrones (Next.js 15+).
- Correction des problèmes d'affichage des modales de suspension via React Portals.
- Installation de @tailwindcss/typography et correction du débordement de texte (break-words).
- Implémentation des actions de modération (suspension/révocation) pour les utilisateurs et boutiques.
2026-04-12 18:59:20 +02:00

115 lines
2.2 KiB
TypeScript

export enum UserRole {
VISITOR = 'VISITOR',
ENTREPRENEUR = 'ENTREPRENEUR',
ADMIN = 'ADMIN'
}
export interface User {
id: string;
name: string;
email: string;
role: UserRole;
avatar?: string;
isSuspended?: boolean;
suspensionReason?: string;
}
export interface SocialLinks {
facebook?: string;
linkedin?: string;
instagram?: string;
website?: string;
}
export interface Business {
id: string;
ownerId: string;
name: string;
slug?: string;
category: string;
location: string; // City, Country
description: string;
logoUrl: string;
videoUrl?: string; // YouTube/Vimeo link
socialLinks?: SocialLinks;
contactEmail: string;
contactPhone?: string;
websiteUrl?: string;
showEmail: boolean;
showPhone: boolean;
showSocials: boolean;
isActive: boolean;
verified: boolean;
viewCount: number;
rating: number;
tags: string[];
isSuspended?: boolean;
suspensionReason?: string;
// New fields for "Entrepreneur of the Month"
isFeatured?: boolean;
founderName?: string;
founderImageUrl?: string;
keyMetric?: string; // "3000 clients delivered"
offers?: Offer[]; // Joined from database or from mocks
}
export enum OfferType {
PRODUCT = 'PRODUCT',
SERVICE = 'SERVICE'
}
export interface Offer {
id: string;
businessId: string;
title: string;
type: OfferType;
price: number;
currency: 'EUR' | 'XOF';
description?: string;
imageUrl: string;
active: boolean;
}
export interface BlogPost {
id: string;
title: string;
excerpt: string;
content: string;
author: string;
date: string;
imageUrl: string;
}
export enum InterviewType {
VIDEO = 'VIDEO',
ARTICLE = 'ARTICLE'
}
export interface Interview {
id: string;
title: string;
guestName: string;
companyName: string;
role: string;
type: InterviewType;
thumbnailUrl: string;
videoUrl?: string;
content?: string;
excerpt: string;
date: string;
duration?: string; // e.g. "15 min" or "5 min de lecture"
}
export const CATEGORIES = [
"Technologie & IT",
"Agriculture & Agrobusiness",
"Mode & Textile",
"Cosmétique & Beauté",
"Services aux entreprises",
"Restauration & Alimentation",
"Construction & BTP",
"Éducation & Formation"
];