/**
 * Supabase Database Types
 * Generated based on the schema in supabase/schema.sql
 */

export interface Database {
  public: {
    Tables: {
      users: {
        Row: {
          id: string;
          name: string;
          email: string;
          avatar_url: string | null;
          created_at: string;
        };
        Insert: {
          id?: string;
          name: string;
          email: string;
          avatar_url?: string | null;
          created_at?: string;
        };
        Update: {
          id?: string;
          name?: string;
          email?: string;
          avatar_url?: string | null;
          created_at?: string;
        };
      };
      profiles: {
        Row: {
          id: string;
          name: string | null;
          avatar_url: string | null;
          created_at: string;
          updated_at: string;
        };
        Insert: {
          id: string;
          name?: string | null;
          avatar_url?: string | null;
          created_at?: string;
          updated_at?: string;
        };
        Update: {
          id?: string;
          name?: string | null;
          avatar_url?: string | null;
          created_at?: string;
          updated_at?: string;
        };
      };
      sessions: {
        Row: {
          id: string;
          user_id: string;
          token_hash: string;
          created_at: string;
          expires_at: string;
        };
        Insert: {
          id?: string;
          user_id: string;
          token_hash: string;
          created_at?: string;
          expires_at: string;
        };
        Update: {
          id?: string;
          user_id?: string;
          token_hash?: string;
          created_at?: string;
          expires_at?: string;
        };
      };
      password_reset_tokens: {
        Row: {
          id: string;
          user_id: string;
          token_hash: string;
          expires_at: string;
          created_at: string;
          used: boolean;
        };
        Insert: {
          id?: string;
          user_id: string;
          token_hash: string;
          expires_at: string;
          created_at?: string;
          used?: boolean;
        };
        Update: {
          id?: string;
          user_id?: string;
          token_hash?: string;
          expires_at?: string;
          created_at?: string;
          used?: boolean;
        };
      };
      projects: {
        Row: {
          id: string;
          name: string;
          description: string | null;
          color: string;
          created_at: string;
        };
        Insert: {
          id?: string;
          name: string;
          description?: string | null;
          color: string;
          created_at?: string;
        };
        Update: {
          id?: string;
          name?: string;
          description?: string | null;
          color?: string;
          created_at?: string;
        };
      };
      sprints: {
        Row: {
          id: string;
          name: string;
          goal: string | null;
          start_date: string;
          end_date: string;
          status: 'planning' | 'active' | 'completed';
          project_id: string;
          created_at: string;
        };
        Insert: {
          id?: string;
          name: string;
          goal?: string | null;
          start_date: string;
          end_date: string;
          status: 'planning' | 'active' | 'completed';
          project_id: string;
          created_at?: string;
        };
        Update: {
          id?: string;
          name?: string;
          goal?: string | null;
          start_date?: string;
          end_date?: string;
          status?: 'planning' | 'active' | 'completed';
          project_id?: string;
          created_at?: string;
        };
      };
      tasks: {
        Row: {
          id: string;
          title: string;
          description: string | null;
          type: 'idea' | 'task' | 'bug' | 'research' | 'plan';
          status: 'open' | 'todo' | 'blocked' | 'in-progress' | 'review' | 'validate' | 'archived' | 'canceled' | 'done';
          priority: 'low' | 'medium' | 'high' | 'urgent';
          project_id: string;
          sprint_id: string | null;
          created_at: string;
          updated_at: string;
          created_by_id: string | null;
          updated_by_id: string | null;
          assignee_id: string | null;
          due_date: string | null;
          comments: Json;
          tags: Json;
          attachments: Json;
        };
        Insert: {
          id?: string;
          title: string;
          description?: string | null;
          type: 'idea' | 'task' | 'bug' | 'research' | 'plan';
          status: 'open' | 'todo' | 'blocked' | 'in-progress' | 'review' | 'validate' | 'archived' | 'canceled' | 'done';
          priority: 'low' | 'medium' | 'high' | 'urgent';
          project_id: string;
          sprint_id?: string | null;
          created_at?: string;
          updated_at?: string;
          created_by_id?: string | null;
          updated_by_id?: string | null;
          assignee_id?: string | null;
          due_date?: string | null;
          comments?: Json;
          tags?: Json;
          attachments?: Json;
        };
        Update: {
          id?: string;
          title?: string;
          description?: string | null;
          type?: 'idea' | 'task' | 'bug' | 'research' | 'plan';
          status?: 'open' | 'todo' | 'blocked' | 'in-progress' | 'review' | 'validate' | 'archived' | 'canceled' | 'done';
          priority?: 'low' | 'medium' | 'high' | 'urgent';
          project_id?: string;
          sprint_id?: string | null;
          created_at?: string;
          updated_at?: string;
          created_by_id?: string | null;
          updated_by_id?: string | null;
          assignee_id?: string | null;
          due_date?: string | null;
          comments?: Json;
          tags?: Json;
          attachments?: Json;
        };
      };
    };
  };
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type Json = any;
