File size: 4,208 Bytes
8fb4cca | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
// Import React to support React.ReactNode type usage
import React from 'react';
export type Language = 'en' | 'zh' | 'ja' | 'ko' | 'es' | 'fr';
export type CompositionMode = 'classic' | 'dynamic' | 'cinematic';
export type Resolution = 'standard' | 'high' | 'ultra';
export type SubjectType = 'female' | 'male' | 'couple' | 'child' | 'family';
export interface WeddingStyle {
id: string;
name: string; // Fallback name
prompt: string;
promptKeywords?: string[]; // New: Synonyms or related terms for improved AI understanding
description: string; // Fallback description
coverColor: string;
previewImage?: string; // New: Optional preview image for the style card
category?: string;
icon?: React.ReactNode;
isCustom?: boolean;
tags?: ('hot' | 'new' | 'recommend')[];
isLocked?: boolean; // New: VIP Lock status
groupCount?: number; // PDD: How many people joining
}
export interface GenerationConfig {
customInstruction?: string;
filter: string;
blurAmount: number;
compositionMode: CompositionMode;
resolution: Resolution;
subjectType?: SubjectType;
}
export interface GeneratedResult {
styleId: string;
imageUrl: string;
timestamp: number;
config?: GenerationConfig;
}
export type GenerationStatus = 'idle' | 'generating' | 'success' | 'error' | 'partial';
// --- NEW TYPES FOR ADMIN & USER CENTER ---
export interface LeadData {
id: string;
userId?: string; // Linked User Account ID
name: string;
phone: string;
wechat?: string;
service?: string;
budget?: string;
date?: string;
timestamp: number;
status: 'new' | 'contacted' | 'booked';
// CRM Intelligence Fields
preferredStyle?: string; // e.g., 'Korean Minimalist'
generationCount?: number; // How many times they generated (Intent Score)
syncStatus?: 'pending' | 'synced' | 'failed'; // CRM Sync Status
crmId?: string; // External ID
}
export interface GenerationLog {
styleId: string;
styleName: string;
userId: string;
timestamp: number;
ip: string;
location: string;
device: string;
}
export interface AdminConfig {
promoText: string;
promoEnds: string; // ISO Date string
contactPhone: string;
showBanner: boolean;
footerAddress: string;
// Custom Branding
logoUrl?: string; // NEW: Custom App Logo
// Marketing / Share
shareTitle?: string;
shareDesc?: string;
shareImage?: string;
redPacketMax?: number;
slashDifficulty?: number;
shareConfig?: any;
// Custom Content (About Us & Contact)
aboutStory?: string;
aboutPhilosophy?: string;
aboutLocation?: string;
qrCodeUrl?: string; // Custom Booking QR Code
// Membership Mechanics
pointsShare?: number;
pointsInvite?: number;
pointsBook?: number;
pointsVipCost?: number; // Cost to redeem VIP
// CRM & System Config
crmApiUrl?: string;
crmApiKey?: string;
geminiApiKey?: string; // Dynamic API Key
geminiApiUrl?: string; // Dynamic API Base URL (Proxy)
}
export interface PointHistory {
id: string;
action: 'share' | 'invite' | 'book' | 'redeem' | 'admin_adjust' | 'slash_help';
points: number;
timestamp: number;
desc: string;
}
export interface StaffPermissions {
canExportLeads: boolean;
canDeleteLeads: boolean;
canManageSettings: boolean;
canManageUsers: boolean;
canManageStaff: boolean;
}
export interface UserAccount {
id: string;
name: string;
phone?: string; // NEW: For login
password?: string; // NEW: Mock password
avatar?: string;
points: number;
isVip: boolean;
joinDate: number;
history: PointHistory[];
role: 'user' | 'staff' | 'admin'; // NEW: Role based access
permissions?: StaffPermissions; // NEW: Granular permissions
favorites?: string[]; // NEW: Persisted favorites
// BI Analytics
styleStats?: Record<string, number>; // { 'korean': 5, 'chinese': 2 }
// PDD Mechanics
redPacketBalance?: number; // e.g. 1980
slashProgress?: Record<string, number>; // styleId -> percentage (0-100)
}
export type VideoTemplate = 'default' | 'flash' | 'slow' | 'story';
export interface FeedbackItem {
id: string;
userId?: string;
type: 'bug' | 'suggestion' | 'other';
rating: number;
content: string;
timestamp: number;
contact?: string;
}
|