PDF reading with python
This commit is contained in:
26
api/db/migrations/20211029150551_tipo_categoria.php
Normal file
26
api/db/migrations/20211029150551_tipo_categoria.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class TipoCategoria extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change(): void
|
||||
{
|
||||
$this->table('tipos_categoria')
|
||||
->addColumn('descripcion', 'string')
|
||||
->addColumn('activo', 'boolean')
|
||||
->create();
|
||||
}
|
||||
}
|
25
api/db/migrations/20211029150601_tipo_estado_coneccion.php
Normal file
25
api/db/migrations/20211029150601_tipo_estado_coneccion.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class TipoEstadoConeccion extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change(): void
|
||||
{
|
||||
$this->table('tipos_estado_coneccion')
|
||||
->addColumn('descripcion', 'string')
|
||||
->create();
|
||||
}
|
||||
}
|
25
api/db/migrations/20211029150754_tipo_cuenta.php
Normal file
25
api/db/migrations/20211029150754_tipo_cuenta.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class TipoCuenta extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change(): void
|
||||
{
|
||||
$this->table('tipos_cuenta')
|
||||
->addColumn('descripcion', 'string')
|
||||
->create();
|
||||
}
|
||||
}
|
27
api/db/migrations/20211029152716_categoria.php
Normal file
27
api/db/migrations/20211029152716_categoria.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class Categoria extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change(): void
|
||||
{
|
||||
$this->table('categorias')
|
||||
->addColumn('nombre', 'string')
|
||||
->addColumn('tipo_id', 'integer')
|
||||
->addForeignKey('tipo_id', 'tipos_categoria')
|
||||
->create();
|
||||
}
|
||||
}
|
25
api/db/migrations/20211029152729_coneccion.php
Normal file
25
api/db/migrations/20211029152729_coneccion.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class Coneccion extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change(): void
|
||||
{
|
||||
$this->table('conecciones')
|
||||
->addColumn('key', 'string')
|
||||
->create();
|
||||
}
|
||||
}
|
29
api/db/migrations/20211029152732_cuenta.php
Normal file
29
api/db/migrations/20211029152732_cuenta.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class Cuenta extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change(): void
|
||||
{
|
||||
$this->table('cuentas')
|
||||
->addColumn('nombre', 'string')
|
||||
->addColumn('categoria_id', 'integer')
|
||||
->addForeignKey('categoria_id', 'categorias')
|
||||
->addColumn('tipo_id', 'integer')
|
||||
->addForeignKey('tipo_id', 'tipos_cuenta')
|
||||
->create();
|
||||
}
|
||||
}
|
29
api/db/migrations/20211029152738_estado_coneccion.php
Normal file
29
api/db/migrations/20211029152738_estado_coneccion.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class EstadoConeccion extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change(): void
|
||||
{
|
||||
$this->table('estados_coneccion')
|
||||
->addColumn('coneccion_id', 'integer')
|
||||
->addForeignKey('coneccion_id', 'conecciones')
|
||||
->addColumn('fecha', 'date')
|
||||
->addColumn('tipo_id', 'integer')
|
||||
->addForeignKey('tipo_id', 'tipos_estado_coneccion')
|
||||
->create();
|
||||
}
|
||||
}
|
32
api/db/migrations/20211029152752_transaccion.php
Normal file
32
api/db/migrations/20211029152752_transaccion.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class Transaccion extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change(): void
|
||||
{
|
||||
$this->table('transacciones')
|
||||
->addColumn('debito_id', 'integer')
|
||||
->addForeignKey('debito_id', 'cuentas')
|
||||
->addColumn('credito_id', 'integer')
|
||||
->addForeignKey('credito_id', 'cuentas')
|
||||
->addColumn('fecha', 'datetime')
|
||||
->addColumn('glosa', 'string')
|
||||
->addColumn('detalle', 'text')
|
||||
->addColumn('valor', 'double')
|
||||
->create();
|
||||
}
|
||||
}
|
36
api/db/seeds/TipoCuenta.php
Normal file
36
api/db/seeds/TipoCuenta.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
|
||||
class TipoCuenta extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* https://book.cakephp.org/phinx/0/en/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'descripcion' => 'Ganancia'
|
||||
],
|
||||
[
|
||||
'descripcion' => 'Activo'
|
||||
],
|
||||
[
|
||||
'descripcion' => 'Pasivo'
|
||||
],
|
||||
[
|
||||
'descripcion' => 'Perdida'
|
||||
]
|
||||
];
|
||||
$this->table('tipos_cuenta')
|
||||
->insert($data)
|
||||
->saveData();
|
||||
}
|
||||
}
|
30
api/db/seeds/TipoEstadoConeccion.php
Normal file
30
api/db/seeds/TipoEstadoConeccion.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
|
||||
use Phinx\Seed\AbstractSeed;
|
||||
|
||||
class TipoEstadoConeccion extends AbstractSeed
|
||||
{
|
||||
/**
|
||||
* Run Method.
|
||||
*
|
||||
* Write your database seeder using this method.
|
||||
*
|
||||
* More information on writing seeders is available here:
|
||||
* https://book.cakephp.org/phinx/0/en/seeding.html
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'descripcion' => 'Activa'
|
||||
],
|
||||
[
|
||||
'descripcion' => 'Inactiva'
|
||||
]
|
||||
];
|
||||
$this->table('tipos_estado_coneccion')
|
||||
->insert($data)
|
||||
->saveData();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user