/** * Database type definitions * * TODO: Generate these from Supabase schema using: * supabase gen types typescript --project-id > types/database.types.ts * * For now, using a placeholder structure that matches our schema */ export type Json = | string | number | boolean | null | { [key: string]: Json | undefined } | Json[] export interface Database { public: { Tables: { inventory_items: { Row: { id: string product_id: string | null name: string quantity: number unit_id: string expiry_date: string | null notes: string | null added_by: string created_at: string updated_at: string } Insert: { id?: string product_id?: string | null name: string quantity: number unit_id: string expiry_date?: string | null notes?: string | null added_by: string created_at?: string updated_at?: string } Update: { id?: string product_id?: string | null name?: string quantity?: number unit_id?: string expiry_date?: string | null notes?: string | null added_by?: string created_at?: string updated_at?: string } } products: { Row: { id: string barcode: string name: string brand: string | null image_url: string | null default_unit_id: string | null cached_at: string created_at: string } Insert: { id?: string barcode: string name: string brand?: string | null image_url?: string | null default_unit_id?: string | null cached_at?: string created_at?: string } Update: { id?: string barcode?: string name?: string brand?: string | null image_url?: string | null default_unit_id?: string | null cached_at?: string created_at?: string } } tags: { Row: { id: string name: string category: 'position' | 'type' | 'custom' icon: string | null color: string | null created_by: string | null created_at: string } Insert: { id?: string name: string category?: 'position' | 'type' | 'custom' icon?: string | null color?: string | null created_by?: string | null created_at?: string } Update: { id?: string name?: string category?: 'position' | 'type' | 'custom' icon?: string | null color?: string | null created_by?: string | null created_at?: string } } units: { Row: { id: string name: string abbreviation: string unit_type: 'weight' | 'volume' | 'count' | 'custom' base_unit_id: string | null conversion_factor: number | null is_default: boolean created_by: string | null created_at: string } Insert: { id?: string name: string abbreviation: string unit_type?: 'weight' | 'volume' | 'count' | 'custom' base_unit_id?: string | null conversion_factor?: number | null is_default?: boolean created_by?: string | null created_at?: string } Update: { id?: string name?: string abbreviation?: string unit_type?: 'weight' | 'volume' | 'count' | 'custom' base_unit_id?: string | null conversion_factor?: number | null is_default?: boolean created_by?: string | null created_at?: string } } item_tags: { Row: { item_id: string tag_id: string created_at: string } Insert: { item_id: string tag_id: string created_at?: string } Update: { item_id?: string tag_id?: string created_at?: string } } } Views: { [_ in never]: never } Functions: { [_ in never]: never } Enums: { tag_category: 'position' | 'type' | 'custom' unit_type: 'weight' | 'volume' | 'count' | 'custom' } } }