initial commit of mobile app

This commit is contained in:
Luca Haid
2026-01-13 12:44:45 +01:00
parent a513507b8f
commit 51b63acbde
32 changed files with 8025 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateWarehouseLagerbewegung extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$lagerbewegung = $this->table('WarehouseLagerbewegung');
$lagerbewegung
->addColumn('movementNumber', 'string', ['limit' => 50, 'null' => true])
->addColumn('movementType', 'enum', ['values' => ['IN', 'OUT', 'ADJUSTMENT']])
->addColumn('articleId', 'integer', ['signed' => false])
->addColumn('warehouseLocationId', 'integer', ['signed' => true])
->addColumn('warehouseItemId', 'integer', ['null' => true, 'signed' => true])
->addColumn('quantity', 'decimal', ['precision' => 10, 'scale' => 2])
->addColumn('quantityBefore', 'decimal', ['precision' => 10, 'scale' => 2, 'null' => true])
->addColumn('quantityAfter', 'decimal', ['precision' => 10, 'scale' => 2, 'null' => true])
->addColumn('reasonCategory', 'string', ['limit' => 50])
->addColumn('note', 'text', ['null' => true])
->addColumn('userId', 'integer', ['signed' => false])
->addColumn('createBy', 'integer', ['signed' => false])
->addColumn('create', 'integer')
->addIndex(['movementNumber'], ['unique' => true])
->addIndex(['articleId'])
->addIndex(['warehouseLocationId'])
->addIndex(['movementType'])
->addIndex(['userId'])
->addIndex(['create'])
->create();
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table('WarehouseLagerbewegung')->drop()->save();
}
}
}

View File

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class RenameLagerbewegungToMovement extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table('WarehouseLagerbewegung')->rename('WarehouseMovement')->save();
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table('WarehouseMovement')->rename('WarehouseLagerbewegung')->save();
}
}
}