Files
webMontime/src/api/types.ts
T

85 lines
1.8 KiB
TypeScript
Raw Normal View History

export type BusinessCategory = {
id: string;
slug: string;
title: string;
isActive: boolean;
};
export type BusinessImage = {
id: string;
url: string;
isCover: boolean;
sortOrder: number;
};
export type Business = {
id: string;
title: string;
slug: string;
description: string | null;
contactPhone: string | null;
address: string | null;
latitude: number | null;
longitude: number | null;
isActive: boolean;
categoryId: string;
ownerId?: string | null;
category?: BusinessCategory;
images?: BusinessImage[];
};
export type BusinessRegistrationStatus = 'pending' | 'approved' | 'rejected';
export type BusinessRegistrationRequest = {
id: string;
applicantId: string;
status: BusinessRegistrationStatus;
title: string;
slug: string;
categoryId: string;
description: string | null;
contactPhone: string | null;
address: string | null;
adminNote: string | null;
businessId: string | null;
createdAt: string;
category?: BusinessCategory;
applicant?: { id: string; mobile: string; fullName: string | null };
};
export type CreateBusinessRegistrationPayload = {
title: string;
categoryId: string;
slug?: string;
description?: string;
contactPhone?: string;
address?: string;
};
export type UpdateBusinessPayload = {
title?: string;
description?: string | null;
contactPhone?: string | null;
address?: string | null;
latitude?: number | null;
longitude?: number | null;
};
export type ServiceTemplate = {
id: string;
title: string;
slug: string;
description: string | null;
defaultDurationMinutes: number;
};
export type BusinessService = {
id: string;
businessId: string;
serviceTemplateId: string;
price: string;
durationMinutes: number | null;
isActive: boolean;
serviceTemplate?: ServiceTemplate;
};