Spaces:
Paused
Paused
| export type Json = | |
| | string | |
| | number | |
| | boolean | |
| | null | |
| | { [key: string]: Json | undefined } | |
| | Json[] | |
| export interface Database { | |
| public: { | |
| Tables: { | |
| profiles: { | |
| Row: { | |
| id: string | |
| email: string | null | |
| full_name: string | null | |
| avatar_url: string | null | |
| is_premium: boolean | |
| premium_expires_at: string | null | |
| tokens_remaining: number | |
| tokens_reset_at: string | |
| created_at: string | |
| updated_at: string | |
| } | |
| Insert: { | |
| id: string | |
| email?: string | null | |
| full_name?: string | null | |
| avatar_url?: string | null | |
| is_premium?: boolean | |
| premium_expires_at?: string | null | |
| tokens_remaining?: number | |
| tokens_reset_at?: string | |
| created_at?: string | |
| updated_at?: string | |
| } | |
| Update: { | |
| id?: string | |
| email?: string | null | |
| full_name?: string | null | |
| avatar_url?: string | null | |
| is_premium?: boolean | |
| premium_expires_at?: string | null | |
| tokens_remaining?: number | |
| tokens_reset_at?: string | |
| created_at?: string | |
| updated_at?: string | |
| } | |
| } | |
| projects: { | |
| Row: { | |
| id: string | |
| user_id: string | |
| name: string | |
| description: string | null | |
| html_code: string | |
| css_code: string | |
| js_code: string | |
| preview_url: string | null | |
| thumbnail_url: string | null | |
| is_public: boolean | |
| created_at: string | |
| updated_at: string | |
| } | |
| Insert: { | |
| id?: string | |
| user_id: string | |
| name?: string | |
| description?: string | null | |
| html_code?: string | |
| css_code?: string | |
| js_code?: string | |
| preview_url?: string | null | |
| thumbnail_url?: string | null | |
| is_public?: boolean | |
| created_at?: string | |
| updated_at?: string | |
| } | |
| Update: { | |
| id?: string | |
| user_id?: string | |
| name?: string | |
| description?: string | null | |
| html_code?: string | |
| css_code?: string | |
| js_code?: string | |
| preview_url?: string | null | |
| thumbnail_url?: string | null | |
| is_public?: boolean | |
| created_at?: string | |
| updated_at?: string | |
| } | |
| } | |
| chat_messages: { | |
| Row: { | |
| id: string | |
| user_id: string | |
| project_id: string | null | |
| role: 'user' | 'assistant' | |
| content: string | |
| tokens_used: number | |
| created_at: string | |
| } | |
| Insert: { | |
| id?: string | |
| user_id: string | |
| project_id?: string | null | |
| role: 'user' | 'assistant' | |
| content: string | |
| tokens_used?: number | |
| created_at?: string | |
| } | |
| Update: { | |
| id?: string | |
| user_id?: string | |
| project_id?: string | null | |
| role?: 'user' | 'assistant' | |
| content?: string | |
| tokens_used?: number | |
| created_at?: string | |
| } | |
| } | |
| token_transactions: { | |
| Row: { | |
| id: string | |
| user_id: string | |
| transaction_type: 'ai_usage' | 'ad_reward' | 'daily_reset' | 'purchase' | 'premium_bonus' | |
| amount: number | |
| description: string | null | |
| created_at: string | |
| } | |
| Insert: { | |
| id?: string | |
| user_id: string | |
| transaction_type: 'ai_usage' | 'ad_reward' | 'daily_reset' | 'purchase' | 'premium_bonus' | |
| amount: number | |
| description?: string | null | |
| created_at?: string | |
| } | |
| Update: { | |
| id?: string | |
| user_id?: string | |
| transaction_type?: 'ai_usage' | 'ad_reward' | 'daily_reset' | 'purchase' | 'premium_bonus' | |
| amount?: number | |
| description?: string | null | |
| created_at?: string | |
| } | |
| } | |
| subscriptions: { | |
| Row: { | |
| id: string | |
| user_id: string | |
| status: 'active' | 'canceled' | 'past_due' | 'trialing' | 'beta' | |
| current_period_end: string | null | |
| cancel_at_period_end: boolean | |
| created_at: string | |
| updated_at: string | |
| } | |
| Insert: { | |
| id?: string | |
| user_id: string | |
| status: 'active' | 'canceled' | 'past_due' | 'trialing' | 'beta' | |
| current_period_end?: string | null | |
| cancel_at_period_end?: boolean | |
| created_at?: string | |
| updated_at?: string | |
| } | |
| Update: { | |
| id?: string | |
| user_id?: string | |
| status?: 'active' | 'canceled' | 'past_due' | 'trialing' | 'beta' | |
| current_period_end?: string | null | |
| cancel_at_period_end?: boolean | |
| created_at?: string | |
| updated_at?: string | |
| } | |
| } | |
| ad_engagements: { | |
| Row: { | |
| id: string | |
| user_id: string | |
| ad_type: 'banner' | 'rewarded' | |
| ad_slot: string | null | |
| reward_amount: number | |
| completed: boolean | |
| created_at: string | |
| } | |
| Insert: { | |
| id?: string | |
| user_id: string | |
| ad_type: 'banner' | 'rewarded' | |
| ad_slot?: string | null | |
| reward_amount?: number | |
| completed?: boolean | |
| created_at?: string | |
| } | |
| Update: { | |
| id?: string | |
| user_id?: string | |
| ad_type?: 'banner' | 'rewarded' | |
| ad_slot?: string | null | |
| reward_amount?: number | |
| completed?: boolean | |
| created_at?: string | |
| } | |
| } | |
| } | |
| } | |
| } | |