export type ClientType = "pf" | "pj";

export interface Client {
  id: string;
  created_at: string;
  updated_at: string;
  user_id: string;
  name: string;
  avatar_url?: string | null;
  company_name: string | null;
  type: ClientType;
  document: string | null;
  email: string | null;
  phone: string | null;
  whatsapp: string | null;
  whatsapp_notify?: boolean;
  address_zip: string | null;
  address_street: string | null;
  address_number: string | null;
  address_complement: string | null;
  address_neighborhood: string | null;
  address_city: string | null;
  address_state: string | null;
  /* Dados que a nota fiscal usa (migration 135). */
  address_ibge?: string | null;
  inscricao_estadual?: string | null;
  contribuinte_icms?: "contribuinte" | "isento" | "nao_contribuinte" | null;
  notes: string | null;
  tags: string[];
  is_system_placeholder?: boolean;
  portal_enabled?: boolean;
  portal_last_login_at?: string | null;
  portal_password_updated_at?: string | null;
  /* Aprovação do cadastro feito pela loja (migration 159): approved (pode ver
     preço e comprar), pending (espera a loja aprovar), rejected (recusado). */
  portal_status?: "approved" | "pending" | "rejected" | null;
  portal_requested_at?: string | null;
  portal_reviewed_at?: string | null;
  portal_reviewed_by?: string | null;
  active: boolean;
  /* Campos próprios da empresa, pela chave (migration 187). */
  campos_proprios?: Record<string, unknown> | null;
}
