
create table cidades (
 id uuid primary key default gen_random_uuid(),
 nome text,
 estado text,
 ativo boolean default true
);

create table profissionais (
 id uuid primary key default gen_random_uuid(),
 nome text,
 telefone text,
 cidade_id uuid,
 categoria text,
 avaliacao_media numeric default 0
);

create table clientes (
 id uuid primary key default gen_random_uuid(),
 nome text,
 telefone text,
 cidade_id uuid
);

create table servicos (
 id uuid primary key default gen_random_uuid(),
 cliente_id uuid,
 categoria text,
 cidade_id uuid,
 descricao text,
 valor numeric,
 status text
);

create table avaliacoes (
 id uuid primary key default gen_random_uuid(),
 servico_id uuid,
 cliente_id uuid,
 profissional_id uuid,
 nota int,
 comentario text,
 data timestamp default now()
);
