app/db/seeds.rb
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }},)
# Character.create(name: 'Luke', movie: movies.first)
puts "Criando Usuários"
User.create name: "administrador", role: 1, email: 'administrador@email.com', password: '12345678', password_confirmation: '12345678', approved: true
User.create name: "atendente", role: 0, email: 'atendente@email.com', password: '12345678', password_confirmation: '12345678', approved: true
puts "Inserindo Lista de Bancos"
Bank.create([
{name: 'DEFAULT', code: '000'},
{name: 'BANCO DO BRASIL', code: '001'},
{name: 'CAIXA ECONÔMICA FEDERAL', code: ' 104'},
{name: 'BCO SANTANDER (BRASIL) S.A. ', code: ' 033 '},
{name: 'BCO MERCANTIL DO BRASIL S.A. ', code: ' 389 '},
{name: 'CITIBANK S.A. ', code: ' 745 '},
{name: 'CITIBANK N.A. ', code: ' 477'},
{name: 'BCO CREFISA S.A. ', code: ' 069 '},
{name: 'BCO BMG S.A ', code: ' 318 '},
{name: 'BANCO ITAÚ BBA S.A. ', code: ' 184'},
{name: 'BANCO ITAÚ BANK S.A ', code: ' 479'},
{name: 'ITAÚ UNIBANCO HOLDING S.A. ', code: ' 652'},
{name: 'ITAÚ UNIBANCO BM S.A. ', code: ' 341'},
{name: 'BCO BRADESCO S.A. ', code: ' 237 '},
{name: 'BANCO BRADESCO BBI S.A. ', code: ' 036'},
{name: 'BANCO BRADESCO CARTÕES S.A. ', code: ' 204'},
{name: 'BANCO BRADESCO FINANCIAMENTOS S.A ', code: '394'},
{name: 'BANCO BRADESCO BERJ S.A. ', code: ' 122'},
{name: 'BANCO DE BRASILIA S.A ', code: ' 070 '},
{name: 'BANCO NEON S.A. ', code: ' 735 '},
{name: 'BANCO INTERMEDIUM S/A ', code: ' 077 '},
{name: 'BCO RIBEIRAO PRETO S.A. ', code: ' 741 '},
{name: 'BANCO CETELEM S.A. ', code: ' 739 '},
{name: 'BANCO SEMEAR ', code: ' 743 – '},
{name: 'BCO BRADESCO FINANC. S.A. ', code: ' 394'},
{name: 'BCO RABOBANK INTL BRASIL S.A. ', code: ' 747 '},
{name: 'BCO COOPERATIVO SICREDI S.A. ', code: ' 748 '},
{name: 'KIRTON BANK ', code: ' 399'},
{name: 'BCO KEB HANA DO BRASIL S.A. ', code: ' 757 '},
{name: 'UNIPRIME NORTE DO PARANÁ ', code: ' 084 '},
{name: 'HIPERCARD BM S.A. ', code: ' 062 '},
{name: 'BCO. J.SAFRA S.A. ', code: ' 074 '},
{name: 'UNIPRIME CENTRAL CCC LTDA. ', code: ' 099 '},
{name: 'BCO ALFA S.A. ', code: ' 025 '},
{name: 'BCO CARGILL S.A. ', code: ' 040 '},
{name: 'BANCO BRADESCARD ', code: ' 063'},
{name: 'BCO DA AMAZONIA S.A. ', code: ' 003 '},
{name: 'CCC NOROESTE BRASILEIRO LTDA. ', code: ' 097'},
{name: 'BCO DO EST. DO PA S.A. ', code: ' 037 '},
{name: 'CCC URBANO ', code: ' 085'},
{name: 'CENTRAL CECM ESP. SANTO ', code: ' 114'},
{name: 'BCO BBI S.A. ', code: ' 036 '},
{name: 'BCO DO NORDESTE DO BRASIL S.A. ', code: ' 004 '},
{name: 'BCO CCB BRASIL S.A. ', code: ' 320 '},
{name: 'BCO ORIGINAL DO AGRO S/A ', code: '079'},
{name: 'CONFEDERACAO NAC DAS CCC SOL ', code: ' 133'},
{name: 'BCO AGIPLAN S.A.', code: ' 121'},
{name: 'BCO DA CHINA BRASIL S.A. ', code: ' 083 '},
{name: 'BANCO FINAXIS ', code: ' 094 '},
{name: 'BCO DO EST. DE SE S.A. ', code: '047 '},
{name: 'PARANA BCO S.A. ', code: ' 254 '},
{name: 'BCO BBM S.A. ', code: ' 107 '},
{name: 'BCO CAPITAL S.A. ', code: ' 412 '},
{name: 'BCO WOORI BANK DO BRASIL S.A. ', code: ' 124'},
{name: 'BCO TRIANGULO S.A. ', code: ' 634 '},
{name: 'ICBC DO BRASIL BM S.A. ', code: ' 132 '},
{name: 'COMMERZBANK BRASIL S.A. BCO MÚLTIPLO ', code: ' 163 '},
{name: 'BCO BANESTES S.A. ', code: ' 021 '},
{name: 'BCO ABC BRASIL S.A. ', code: ' 246 '},
{name: 'SCOTIABANK BRASIL ', code: ' 751 '},
{name: 'BCO MODAL S.A. ', code: ' 746 '},
{name: 'BCO CLASSICO S.A. ', code: ' 241 '},
{name: 'BCO GUANABARA S.A. ', code: ' 612 '},
{name: 'BCO INDUSTRIAL DO BRASIL S.A. ', code: '604 '},
{name: 'BCO CREDIT SUISSE (BRL) S.A. ', code: ' 505 '},
{name: 'BCO LA NACION ARGENTINA ', code: ' 300 '},
{name: 'BCO CEDULA S.A. ', code: ' 266 '},
{name: 'BCO J.P. MORGAN S.A.', code: ' 376 '},
{name: 'BCO CACIQUE S.A. ', code: ' 263 '},
{name: 'BCO CAIXA GERAL BRASIL S.A. ', code: ' 473 '},
{name: 'BCO RODOBENS S.A. ', code: ' 120 '},
{name: 'BCO BOAVISTA INTERATLANTICO S.A. ', code: ' 248'},
{name: 'BCO FATOR S.A. ', code: ' 265 '},
{name: 'BANIF BRASIL BM S.A. ', code: '719 '},
{name: 'BCO MÁXIMA S.A. ', code: ' 243 '},
{name: 'BRASIL PLURAL S.A. BCO. ', code: ' 125 '},
{name: 'BANCO ANDBANK (BRASIL) S.A. ', code: ' 065 '},
{name: 'BCO REP ORIENTAL URUGUAY BCE ', code: ' 494'},
{name: 'BCO TRICURY S.A. ', code: ' 018 '},
{name: 'BCO SAFRA S.A. ', code: ' 422 '},
{name: 'BCO FIBRA S.A. ', code: ' 224 '},
{name: 'BCO LUSO BRASILEIRO S.A. ', code: ' 600 '},
{name: 'BANCO PAN ', code: ' 623 '},
{name: 'BCO VOTORANTIM S.A. ', code: ' 655 '},
{name: 'BCO SUMITOMO MITSUI BRASIL S.A. ', code: ' 464'},
{name: 'BCO BRADESCO S.A. ', code: ' 237 '},
{name: 'BCO PECUNIA S.A. ', code: ' 613 '},
{name: 'BCO SOFISA S.A. ', code: ' 637 '},
{name: 'BCO INDUSVAL S.A. ', code: ' 653 '},
{name: 'BANCO INVESTCRED UNIBANCO S.A. ', code: ' 249 '},
{name: 'BCO BMG S.A.', code: ' 318 '},
{name: 'BCO FICSA S.A. ', code: ' 626 '},
{name: 'BCO SOCIETE GENERALE BRASIL ', code: ' 366 '},
{name: 'BCO PAULISTA S.A. ', code: ' 611 '},
{name: 'BOFA MERRILL LYNCH BM S.A. ', code: ' 755 '},
{name: 'CCR REG MOGIANA ', code: ' 089'},
{name: 'BCO PINE S.A. ', code: ' 643 '},
{name: 'BCO DAYCOVAL S.A ', code: ' 707 '},
{name: 'DEUTSCHE BANK S.A. BCO ALEMAO ', code: ' 487 '},
{name: 'BANCO CIFRA ', code: ' 233'},
{name: 'BCO RENDIMENTO S.A. ', code: ' 633 '},
{name: 'BANCO BONSUCESSO S.A. ', code: ' 218 '},
{name: 'CCCM SICOOB UNIMAIS ', code: ' 090'},
{name: 'NOVO BCO CONTINENTAL S.A. ', code: ' 753 '},
{name: 'BCO CRÉDIT AGRICOLE BR S.A. ', code: ' 222 '},
{name: 'CREDIALIANÇA CCR ', code: ' 098 '},
{name: 'BCO VR S.A. ', code: ' 610 '},
{name: 'CREDICOAMO ', code: ' 010 '},
{name: 'BANCO JOHN DEERE S.A. ', code: ' 217 '},
{name: 'BCO DO ESTADO DO RS S.A. ', code: ' 041 '},
{name: 'BCO A.J. RENNER S.A. ', code: ' 654 '},
{name: 'BANCO ORIGINAL ', code: ' 212 '}]
)
puts "Criando Conta padrão"
BankAccount.create agency: '000', digit: '000', name: 'Conta padrão', bank_id: Bank.first.id, account: '000'
puts "pronto!"