mirror of
https://git.meshkee.com/Meshkee/backend.git
synced 2026-08-12 06:40:58 +04:30
Initial commit: Meshkee CMS API
NestJS backend with Prisma, Docker Compose for Postgres/Redis, and deploy docs for the production VM.
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
import type { BusinessPrimaryColorId } from './business-primary-colors';
|
||||
import { DEFAULT_BUSINESS_PRIMARY_COLOR_ID } from './business-primary-colors';
|
||||
|
||||
export type BrandingSettings = {
|
||||
primaryColor: BusinessPrimaryColorId;
|
||||
};
|
||||
|
||||
export type DashboardCommentsSettings = {
|
||||
autoApprove: boolean;
|
||||
};
|
||||
|
||||
export type DashboardExpertReviewsSettings = {
|
||||
autoApprove: boolean;
|
||||
};
|
||||
|
||||
/** Per-business dashboard settings. Add new sections here as the CMS grows. */
|
||||
export type DashboardSettings = {
|
||||
comments: DashboardCommentsSettings;
|
||||
expertReviews: DashboardExpertReviewsSettings;
|
||||
};
|
||||
|
||||
export type OrderProcessStep = {
|
||||
id: string;
|
||||
label: string;
|
||||
color: string;
|
||||
};
|
||||
|
||||
/** Per-business store / sales settings. */
|
||||
export type StoreSettings = {
|
||||
onlineSellEnabled: boolean;
|
||||
orderProcessSteps: OrderProcessStep[];
|
||||
};
|
||||
|
||||
/** Top-level business settings stored in `businesses.settings` JSONB. */
|
||||
export type BusinessSettings = {
|
||||
branding: BrandingSettings;
|
||||
dashboard: DashboardSettings;
|
||||
store: StoreSettings;
|
||||
};
|
||||
|
||||
export const DEFAULT_ORDER_PROCESS_STEPS: OrderProcessStep[] = [
|
||||
{ id: 'processing', label: 'Under processing', color: '#3B82F6' },
|
||||
{ id: 'ready-for-shipping', label: 'Ready for shipping', color: '#F59E0B' },
|
||||
{ id: 'shipped', label: 'Shipped', color: '#8B5CF6' },
|
||||
{ id: 'delivered', label: 'Delivered', color: '#22C55E' },
|
||||
];
|
||||
|
||||
export const DEFAULT_BUSINESS_SETTINGS: BusinessSettings = {
|
||||
branding: {
|
||||
primaryColor: DEFAULT_BUSINESS_PRIMARY_COLOR_ID,
|
||||
},
|
||||
dashboard: {
|
||||
comments: { autoApprove: false },
|
||||
expertReviews: { autoApprove: false },
|
||||
},
|
||||
store: {
|
||||
onlineSellEnabled: true,
|
||||
orderProcessSteps: DEFAULT_ORDER_PROCESS_STEPS,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user