Add model and views for bank accounts
This commit is contained in:
parent
4b1e9a6f53
commit
f0a55fb951
24 changed files with 351 additions and 1 deletions
|
|
@ -0,0 +1,25 @@
|
|||
class CreateBankAccountsAndTransactions < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :bank_accounts do |t|
|
||||
t.string :name, null: false
|
||||
t.string :iban
|
||||
t.string :description
|
||||
t.decimal :balance, precision: 12, scale: 2, default: 0, null: false
|
||||
t.datetime :last_import
|
||||
t.string :import_continuation_point
|
||||
end
|
||||
|
||||
create_table :bank_transactions do |t|
|
||||
t.references :bank_account, null: false
|
||||
t.string :external_id
|
||||
t.date :date
|
||||
t.decimal :amount, precision: 8, scale: 2, null: false
|
||||
t.string :iban
|
||||
t.string :reference
|
||||
t.text :text
|
||||
t.text :receipt
|
||||
t.binary :image, limit: 1.megabyte
|
||||
t.references :financial_link, index: true
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue