export interface DBBook {
  user_id: string;
  book_hash: string;
  meta_hash?: string;
  format: string;
  title: string;
  source_title?: string;
  author: string;
  group_id?: string;
  group_name?: string;
  tags?: string[];
  progress?: [number, number];
  reading_status?: string;
  reading_status_updated_at?: string | null;
  cover_hash?: string | null;
  cover_updated_at?: string | null;

  metadata?: string | null;
  created_at?: string;
  updated_at?: string;
  deleted_at?: string | null;
  uploaded_at?: string | null;
}

export interface DBBookConfig {
  user_id: string;
  book_hash: string;
  meta_hash?: string;
  location?: string;
  xpointer?: string;
  progress?: string;
  rsvp_position?: string;
  search_config?: string;
  view_settings?: string;

  created_at?: string;
  updated_at?: string;
  deleted_at?: string | null;
}

export interface DBBookNote {
  user_id: string;
  book_hash: string;
  meta_hash?: string;
  id: string;
  type: string;
  cfi?: string;
  xpointer0?: string;
  xpointer1?: string;
  page?: number;
  text?: string;
  style?: string;
  color?: string;
  note: string;
  global?: boolean;

  created_at?: string;
  updated_at?: string;
  deleted_at?: string | null;
}
