FactoryBot.define do
  factory :gestao_de_estoque_devolucao_de_material, class: 'GestaoDeEstoque::DevolucaoDeMaterial' do
    numero_da_devolucao { Faker::Number.number(digits: 3).to_s }
    requisicao_de_material_id { Administrativo::RequisicaoDeMaterial.find_or_create_by!(FactoryBot.attributes_for(:administrativo_requisicao_de_material)).id }
    orcamento_id { Orcamento.find_or_create_by!(FactoryBot.attributes_for(:orcamento_2017)).id }
    status { :aberto }
    data_da_devolucao { "2017-11-11" }
    tipo_de_devolucao { :devolucao_total }
    historico_da_devolucao { Faker::Name.unique.name }
  end
end
