Initial commit
This commit is contained in:
32
app/models/operations/revenue.rb
Normal file
32
app/models/operations/revenue.rb
Normal 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)
|
||||
#
|
||||
Reference in New Issue
Block a user