export type Language = 'KO' | 'EN' | 'JP' | 'CN' | 'TH' | 'VN'; // 펜션 카테고리 타입 export type PensionCategory = | 'PoolVilla' // 풀빌라 | 'OceanView' // 오션뷰 | 'Mountain' // 산장/계곡 | 'Private' // 독채 | 'Couple' // 커플펜션 | 'Family' // 가족펜션 | 'Pet' // 애견동반 | 'Glamping' // 글램핑 | 'Traditional'; // 한옥펜션 export type MusicGenre = | 'Auto' | 'K-Pop' | 'Ballad' | 'Hip-Hop' | 'R&B' | 'EDM' | 'Trot' | 'Jazz' | 'Rock' // Global/KR | 'Pop' | 'Country' // EN | 'J-Pop' | 'Enka' | 'Anime' // JP | 'C-Pop' | 'Mandopop' | 'Traditional CN' // CN | 'T-Pop' | 'Luk Thung' // TH | 'V-Pop' | 'Bolero' // VN ; export type MusicDuration = 'Short' | 'Full'; export type AudioMode = 'Song' | 'Narration' | 'Instrumental'; export type TTSGender = 'Male' | 'Female'; export type TTSAge = 'Young' | 'Middle'; export type TTSTone = 'Professional' | 'Bright' | 'Calm' | 'Energetic'; export type TextEffect = 'Neon' | 'Glitch' | 'Typewriter' | 'Cinematic' | 'Bold' | 'Motion' | 'LineReveal' | 'Boxed' | 'Elegant' | 'BlockReveal' | 'Custom'; export type TransitionEffect = 'Mix' | 'Zoom' | 'Slide' | 'Wipe'; // 전환 효과 추가 export type AspectRatio = '16:9' | '9:16'; export type CreationMode = 'Full' | 'AudioOnly'; // 생성 모드 추가 export interface TTSConfig { gender: TTSGender; age: TTSAge; tone: TTSTone; } export interface BusinessInfo { name: string; description: string; images: File[]; audioMode: AudioMode; musicGenre: MusicGenre; musicDuration: MusicDuration; ttsConfig: TTSConfig; textEffect: TextEffect; transitionEffect?: TransitionEffect; // 전환 효과 필드 visualStyle: VisualStyle; aspectRatio: AspectRatio; creationMode: CreationMode; // 추가됨 sourceUrl?: string; customStyleCSS?: string; address?: string; category?: string; language: Language; useAiImages: boolean; // AI 이미지 생성 허용 여부 pensionCategories?: PensionCategory[]; // 펜션 카테고리 (복수 선택) } export interface GeneratedAssets { id: string; createdAt: number; businessName: string; description?: string; videoUrl: string; audioUrl: string; posterUrl: string; // AudioOnly일 경우 빈 문자열일 수 있음 adCopy: string[]; lyrics: string; audioMode: AudioMode; textEffect: TextEffect; transitionEffect?: TransitionEffect; // 전환 효과 필드 visualStyle: VisualStyle; aspectRatio: AspectRatio; creationMode: CreationMode; // 추가됨 images?: string[]; customStyleCSS?: string; sourceUrl?: string; // 추가됨 musicGenre?: string; // 추가됨 finalVideoPath?: string; // 렌더링 완료된 파일 경로 address?: string; category?: string; language?: Language; pensionCategories?: PensionCategory[]; // 펜션 카테고리 (복수 선택) } export interface LoadingState { status: 'idle' | 'crawling' | 'generating_text' | 'generating_audio' | 'generating_poster' | 'generating_video' | 'completed' | 'error'; message: string; } export enum Step { INPUT = 0, PROCESSING = 1, RESULT = 2 } export type VisualStyle = 'Video' | 'Slideshow'; // 구독 플랜 타입 export type PlanType = 'free' | 'basic' | 'pro' | 'business'; // 플랜별 설정 export const PLAN_CONFIG: Record = { free: { name: 'Free', nameKo: '무료', price: 0, maxPensions: 1, monthlyCredits: 10, features: ['월 10회 영상 생성', '기본 음악', '720p 화질', '펜션 1개'] }, basic: { name: 'Basic', nameKo: '베이직', price: 29000, maxPensions: 1, monthlyCredits: 15, features: ['월 15회 영상 생성', '프리미엄 음악', '1080p 화질', '펜션 1개', 'AI 로고송 2곡'] }, pro: { name: 'Pro', nameKo: '프로', price: 89000, // 베이직의 약 3배 maxPensions: 5, monthlyCredits: 75, // 15 * 5 features: ['월 75회 영상 생성', '프리미엄 음악', '1080p Full HD', '펜션 5개 관리', 'AI 로고송 10곡', 'YouTube 분석', '우선 지원'] }, business: { name: 'Business', nameKo: '비즈니스', price: 249000, maxPensions: 999, // 무제한 monthlyCredits: 999, // 무제한 features: ['무제한 영상', '독점 음악 제작', '4K Ultra HD', '펜션 무제한', '로고송 무제한', '전담 매니저', 'API 연동'] } }; export interface User { id: number; username: string; // ID email?: string; name: string; role: 'admin' | 'user'; phone?: string; business_name?: string; approved?: number; // 0 or 1 emailVerified?: boolean; email_verified?: number; // DB에서 0 or 1 createdAt?: string; // 구독 관련 plan_type?: PlanType; max_pensions?: number; monthly_credits?: number; credits?: number; subscription_started_at?: string; subscription_expires_at?: string; } // 펜션 프로필 타입 export interface PensionProfile { id: number; user_id: number; is_default: number; brand_name: string; brand_name_en?: string; region?: string; address?: string; pension_types?: string; target_customers?: string; key_features?: string; nearby_attractions?: string; booking_url?: string; homepage_url?: string; kakao_channel?: string; instagram_handle?: string; languages?: string; price_range?: string; description?: string; youtube_playlist_id?: string; youtube_playlist_title?: string; createdAt?: string; updatedAt?: string; } // YouTube 분석 데이터 타입 export interface YouTubeAnalytics { id: number; pension_id: number; playlist_id: string; date: string; views: number; playlist_starts: number; average_time_in_playlist: number; estimated_minutes_watched: number; subscribers_gained: number; likes: number; comments: number; shares: number; cached_at: string; } // 월간 통계 타입 export interface PensionMonthlyStats { id: number; pension_id: number; year_month: string; total_views: number; total_videos: number; total_watch_time: number; avg_view_duration: number; top_video_id?: string; growth_rate: number; cached_at: string; } // 에셋 타입 export type AssetType = 'image' | 'audio' | 'video'; export type AssetSourceType = 'upload' | 'crawl' | 'ai_generated' | 'rendered'; // 사용자 에셋 타입 export interface UserAsset { id: number; user_id: number; pension_id?: number; history_id?: number; asset_type: AssetType; source_type: AssetSourceType; file_name: string; file_path: string; file_size: number; mime_type?: string; thumbnail_path?: string; duration?: number; width?: number; height?: number; metadata?: string; is_deleted: number; createdAt: string; } // 스토리지 사용량 통계 export interface StorageStats { totalUsed: number; // bytes storageLimit: number; // MB imageCount: number; audioCount: number; videoCount: number; imageSize: number; // bytes audioSize: number; // bytes videoSize: number; // bytes }