import { STRING, INTEGER } from 'sequelize'

function create (database) {
  return database.define('boleto', {
    instructions: {
      type: STRING,
      allowNull: false
    },

    barcode: {
      type: INTEGER,
      allowNull: false
    }
  })
}

export default { create }

@@ -17,16 +17,34 @@
  INTEGER
+, ENUM, TEXT, DATE
  %7D from 
@@ -54,16 +54,63 @@
 quelize'
+%0Aimport %7B defaultCuidValue %7D from '../lib/cuid'
 %0A%0Afuncti
@@ -178,19 +178,650 @@
    i
-nstructions
+d: %7B%0A      type: STRING,%0A      primaryKey: true,%0A      allowNull: false,%0A      defaultValue: defaultCuidValue('bol_')%0A    %7D,%0A%0A    queue_id: %7B%0A      type: INTEGER,%0A      allowNull: false%0A    %7D,%0A%0A    status: %7B%0A      type: ENUM,%0A      allowNull: false,%0A      values: %5B'pending_registration', 'registered'%5D,%0A      defaultValue: 'pending_registration'%0A    %7D,%0A%0A    expiration_date: %7B%0A      type: DATE,%0A      allowNull: false%0A    %7D,%0A%0A    amount: %7B%0A      type: INTEGER,%0A      allowNull: false%0A    %7D,%0A%0A    paid_amount: %7B%0A      type: INTEGER,%0A      allowNull: false,%0A      defaultValue: 0%0A    %7D,%0A%0A    instructions: %7B%0A      type: TEXT%0A    %7D,%0A%0A    issuer
 : %7B%0A
@@ -879,15 +879,60 @@
     
-barcode
+issuer_id: %7B%0A      type: STRING%0A    %7D,%0A%0A    title_id
 : %7B%0A
@@ -978,18 +978,487 @@
 alse
+,%0A      autoIncrement: true
 %0A    %7D
+,%0A
 %0A  
-%7D
+  payer_name: %7B%0A      type: STRING,%0A      allowNull: false%0A    %7D,%0A%0A    payer_document_type: %7B%0A      type: ENUM,%0A      allowNull: false,%0A      values: %5B'cpf', 'cnpj'%5D,%0A      defaultValue: 'cpf'%0A    %7D,%0A%0A    payer_document_number: %7B%0A      type: STRING,%0A      allowNull: false%0A    %7D%0A  %7D, %7B%0A    indexes: %5B%0A      %7B fields: %5B'queue_id'%5D %7D,%0A      %7B fields: %5B'status'%5D %7D%0A    %5D%0A  %7D)%0A%7D%0A%0Afunction associate (boleto, %7B queue %7D) %7B%0A  boleto.belongsTo(queue
 )%0A%7D%0A
@@ -1474,18 +1474,33 @@
 efault %7B
+%0A  associate,%0A 
  create
- 
+%0A
 %7D%0A

Add boleto model