/**
 * TypeScript-Interfaces fuer haeufig verwendete SQLite-Zeilen.
 * Ergaenzt die zentrale Schema-Definition; nicht alle Spalten sind hier
 * aufgefuehrt, sondern nur die, die im Code regelmaessig gelesen werden.
 */

export interface SessionRow {
  id: number;
  code: string;
  city: string;
  postal_code: string | null;
  lat: number | null;
  lon: number | null;
  radius_km: number;
  diet_filter: string | null;
  cuisine_tags: string | null;
  price_min: number;
  price_max: number;
  exclude_fast_food: number;
  exclude_chains: number;
  open_now_only: number;
  status: string;
  created_by_participant_id: number | null;
  created_at: string;
  expires_at: string;
}

export interface ParticipantRow {
  id: number;
  session_id: number;
  anonymous_id: string;
  display_name: string | null;
  is_creator: number;
  vetos_used: number;
  is_active: number;
  joined_at: string;
  last_seen_at: string;
}

export interface AdminSessionRow {
  id: string;
  admin_user_id: number;
  created_at: string;
  expires_at: string;
  username: string;
}

export interface AdminUserRow {
  id: number;
  username: string;
  password_hash: string;
  totp_secret: string | null;
  totp_enabled: number;
  backup_codes: string | null;
  last_login_at: string | null;
  created_at: string;
}

export interface SponsoredRestaurantRow {
  id: number;
  restaurant_id: number | null;
  name: string;
  image_url: string | null;
  address: string | null;
  city: string;
  postal_code: string | null;
  lat: number | null;
  lon: number | null;
  filter_cuisine_tags: string | null;
  discount_text: string | null;
  disclaimer_text: string | null;
  opening_hours_raw: string | null;
  reservation_url: string | null;
  lieferando_url: string | null;
  priority: number;
  active: number;
  active_from: string | null;
  active_until: string | null;
  created_at: string;
}
