module Ecom module Core class RequestedItem < ApplicationRecord belongs_to :equipment_request belongs_to :equipment belongs_to :country, optional: true validates :start_date, :end_date, :quantity, presence: true validates :quantity, numericality: { only_integer: true, greater_than: 0 } validates_with DateRangeValidator end end end