183 lines
3.4 KiB
TypeScript
183 lines
3.4 KiB
TypeScript
|
|
export enum UserRole {
|
|
VISITOR = 'VISITOR',
|
|
ENTREPRENEUR = 'ENTREPRENEUR',
|
|
ADMIN = 'ADMIN'
|
|
}
|
|
|
|
export interface User {
|
|
id: string;
|
|
name: string;
|
|
email: string;
|
|
role: UserRole;
|
|
avatar?: string;
|
|
phone?: string;
|
|
bio?: string;
|
|
location?: string;
|
|
countryId?: string;
|
|
country?: Country;
|
|
isSuspended?: boolean;
|
|
suspensionReason?: string;
|
|
}
|
|
|
|
export interface SocialLinks {
|
|
facebook?: string;
|
|
linkedin?: string;
|
|
instagram?: string;
|
|
website?: string;
|
|
}
|
|
|
|
export interface Country {
|
|
id: string;
|
|
name: string;
|
|
code: string;
|
|
flag?: string;
|
|
isActive: boolean;
|
|
}
|
|
|
|
export interface Business {
|
|
id: string;
|
|
ownerId: string;
|
|
name: string;
|
|
slug?: string;
|
|
category: string;
|
|
categoryId?: string;
|
|
suggestedCategory?: string;
|
|
location: string; // Legacy: City, Country
|
|
countryId?: string;
|
|
country?: Country;
|
|
city?: string;
|
|
description: string;
|
|
logoUrl: string;
|
|
videoUrl?: string; // YouTube/Vimeo link
|
|
coverUrl?: string;
|
|
coverPosition?: string;
|
|
coverZoom?: number;
|
|
socialLinks?: SocialLinks;
|
|
contactEmail: string;
|
|
contactPhone?: string;
|
|
websiteUrl?: string;
|
|
showEmail: boolean;
|
|
showPhone: boolean;
|
|
showSocials: boolean;
|
|
isActive: boolean;
|
|
verified: boolean;
|
|
viewCount: number;
|
|
rating: number;
|
|
ratingCount: number;
|
|
tags: string[];
|
|
isSuspended?: boolean;
|
|
suspensionReason?: string;
|
|
metaTitle?: string | null;
|
|
metaDescription?: string | null;
|
|
|
|
// 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;
|
|
slug?: string;
|
|
excerpt: string;
|
|
content: string;
|
|
author: string;
|
|
date: string;
|
|
imageUrl: string;
|
|
tags?: 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 interface Rating {
|
|
id: string;
|
|
value: number;
|
|
comment?: string;
|
|
reply?: string;
|
|
replyAt?: string;
|
|
userId: string;
|
|
businessId: string;
|
|
user?: User;
|
|
createdAt: string;
|
|
}
|
|
export interface Event {
|
|
id: string;
|
|
slug?: string;
|
|
title: string;
|
|
description: string;
|
|
date: string;
|
|
location: string;
|
|
thumbnailUrl: string;
|
|
link?: string;
|
|
tags?: string[];
|
|
}
|
|
|
|
export interface BusinessCategory {
|
|
id: string;
|
|
name: string;
|
|
slug: string;
|
|
icon?: string;
|
|
isActive: boolean;
|
|
}
|
|
|
|
export interface SiteSetting {
|
|
id: string;
|
|
siteName: string;
|
|
siteSlogan: string;
|
|
contactEmail: string;
|
|
contactPhone?: string;
|
|
address?: string;
|
|
facebookUrl?: string;
|
|
twitterUrl?: string;
|
|
instagramUrl?: string;
|
|
linkedinUrl?: string;
|
|
footerText?: string;
|
|
homeBlogCount: number;
|
|
homeBlogShow: boolean;
|
|
homeBlogSubtitle: string;
|
|
homeBlogTitle: string;
|
|
homeBlogCategories: string[];
|
|
homeBlogIds: string[];
|
|
homeBlogSelection: string;
|
|
homeCategories: string[];
|
|
}
|