mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 01:11:43 +02:00
Add accounts and activities
This commit is contained in:
parent
fb318e37cb
commit
b5521594ce
8 changed files with 170 additions and 1 deletions
15
db/migrate/20150410124724_create_accounts.rb
Normal file
15
db/migrate/20150410124724_create_accounts.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class CreateAccounts < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :accounts do |t|
|
||||
t.integer :registrar_id
|
||||
t.string :account_type
|
||||
t.decimal :balance
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
Registrar.all.each do |x|
|
||||
Account.create(registrar_id: x.id, account_type: Account::CASH)
|
||||
end
|
||||
end
|
||||
end
|
13
db/migrate/20150410132037_create_account_activities.rb
Normal file
13
db/migrate/20150410132037_create_account_activities.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
class CreateAccountActivities < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :account_activites do |t|
|
||||
t.integer :account_id
|
||||
t.integer :invoice_id
|
||||
t.decimal :amount
|
||||
t.string :currency
|
||||
t.integer :bank_transaction_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
22
db/migrate/20150413080832_create_bank_transactions.rb
Normal file
22
db/migrate/20150413080832_create_bank_transactions.rb
Normal file
|
@ -0,0 +1,22 @@
|
|||
class CreateBankTransactions < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :bank_transactions do |t|
|
||||
t.integer :bank_statement_id
|
||||
t.string :subject_code
|
||||
# record_code # kirjetunnus - ei kasuta? # impordime ainult tehingud nagunii
|
||||
t.string :bank_reference # panga viide
|
||||
t.string :tr_code # tehingu liik (MK / MV)
|
||||
t.string :iban # own bank account no.
|
||||
t.string :currency
|
||||
t.string :other_party_bank
|
||||
t.string :other_party_name
|
||||
t.string :doc_no
|
||||
t.string :description
|
||||
#tr_type # C/D # impordime ainult cre nagunii
|
||||
t.decimal :amount
|
||||
t.string :reference_no
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
14
db/migrate/20150413102310_create_bank_statements.rb
Normal file
14
db/migrate/20150413102310_create_bank_statements.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
class CreateBankStatements < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :bank_statements do |t|
|
||||
t.string :subject_code
|
||||
t.string :bank_code
|
||||
t.string :account_number
|
||||
t.date :date
|
||||
t.time :time
|
||||
t.string :import_file_path
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
27
db/migrate/20150413115829_create_banklink_transactions.rb
Normal file
27
db/migrate/20150413115829_create_banklink_transactions.rb
Normal file
|
@ -0,0 +1,27 @@
|
|||
class CreateBanklinkTransactions < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :banklink_transactions do |t|
|
||||
t.string :vk_service
|
||||
t.string :vk_version
|
||||
t.string :vk_snd_id
|
||||
t.string :vk_rec_id
|
||||
t.string :vk_stamp
|
||||
t.string :vk_t_no
|
||||
t.decimal :vk_amount
|
||||
t.string :vk_curr
|
||||
t.string :vk_rec_acc
|
||||
t.string :vk_rec_name
|
||||
t.string :vk_snd_acc
|
||||
t.string :vk_snd_name
|
||||
t.string :vk_ref
|
||||
t.string :vk_msg
|
||||
t.datetime :vk_t_datetime
|
||||
t.string :vk_mac
|
||||
t.string :vk_encoding
|
||||
t.string :vk_lang
|
||||
t.string :vk_auto
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue