class GestaoDeEstoque::InformacaoExtra < ApplicationRecord
  has_paper_trail

  belongs_to :item_do_recebimento_de_material

  has_one :recebimento_de_material, class_name: "GestaoDeEstoque::RecebimentoDeMaterial", through: :item_do_recebimento, foreign_key: "recebimento_de_material_id"

  validates_presence_of :validade, :aspecto_geral, :item_do_recebimento_de_material_id, :quantidade

  enum aspecto_geral: {
		ruim: 1,
		regular: 2,
		bom: 3
	}
end
