module Ecom::Core class Payment < ApplicationRecord belongs_to :payroll has_many :payment_details, class_name: 'Ecom::Core::PaymentDetail' validates :from, :to, presence: true end end