import type { UserPublic } from './user';

export interface UserReference {
  id: number;
  name: string;
}

export interface Item {
  id: number;
  name: string;
  quantity?: string | null;
  is_complete: boolean;
  price?: number | null;
  list_id: number;
  category_id?: number | null;
  created_at: string;
  updated_at: string;
  completed_at?: string | null;
  version: number;
  added_by_id?: number;
  completed_by_id?: number | null;
  added_by_user?: UserPublic;
  completed_by_user?: UserPublic | null;
  claimed_by_user_id?: number | null;
  claimed_at?: string | null;
  claimed_by_user?: UserPublic | null;
  // UI-only/optimistic properties
  tempId?: string;
  updating?: boolean;
  shakeError?: boolean;
}
