FactoryBot.define do
	factory :licitacao_item_do_lote, class: 'Licitacao::ItemDoLote' do
		lote_id {
			Licitacao::Lote.find_or_create_by!(FactoryBot.attributes_for(:licitacao_lote)).id
		}
		item_do_pedido_id {
			Licitacao::ItemDoPedido.find_by(FactoryBot.attributes_for(:item_do_pedido)).try(:id) || FactoryBot.create(:item_do_pedido).id
		}
		# ordem 1 - gerado automaticamente
	end
end
