Initial commit

This commit is contained in:
Yaser
2026-08-13 19:50:53 +03:30
commit 38084458fe
879 changed files with 95198 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
# frozen_string_literal: true
module Operations
# {Revenue} is a income statement operation
class Revenue < Operation
belongs_to :member
scope :h24, -> { where('created_at > ?', 24.hours.ago) }
end
end
# == Schema Information
# Schema version: 20201125134745
#
# Table name: revenues
#
# id :integer not null, primary key
# code :integer not null
# currency_id :string(255) not null
# member_id :integer
# reference_type :string(255)
# reference_id :integer
# debit :decimal(32, 16) default(0.0), not null
# credit :decimal(32, 16) default(0.0), not null
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_revenues_on_currency_id (currency_id)
# index_revenues_on_reference_type_and_reference_id (reference_type,reference_id)
#