Agregando datos base
This commit is contained in:
31
database/migrations/2025_01_05_052506_create_turno_table.php
Normal file
31
database/migrations/2025_01_05_052506_create_turno_table.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('turnos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->date('fecha');
|
||||
$table->integer('numero_caja');
|
||||
$table->integer('numero_turno');
|
||||
$table->integer('fondo');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('turnos');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('calculo_fondos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('valor');
|
||||
$table->text('descripcion');
|
||||
$table->foreignId('turno_id')->constrained('turnos')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('calculo_fondos');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('documentos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->text('descripcion');
|
||||
$table->bigInteger('valor');
|
||||
$table->text('tipo_documento');
|
||||
$table->foreignId('turno_id')->constrained('turnos')->cascadeOnDelete();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('documentos');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('efectivos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('veinte_mil')->default(0);
|
||||
$table->bigInteger('diez_mil')->default(0);
|
||||
$table->bigInteger('cinco_mil')->default(0);
|
||||
$table->bigInteger('dos_mil')->default(0);
|
||||
$table->bigInteger('mil')->default(0);
|
||||
$table->bigInteger('quinientos')->default(0);
|
||||
$table->bigInteger('cien')->default(0);
|
||||
$table->bigInteger('cincuenta')->default(0);
|
||||
$table->bigInteger('diez')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('efectivos');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('egresos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->text('numero');
|
||||
$table->text('descripcion');
|
||||
$table->bigInteger('valor');
|
||||
$table->text('tipo_egreso');
|
||||
$table->foreignId('turno_id')->constrained('turnos')->cascadeOnDelete();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('egresos');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('estados_resultado', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->date('mes');
|
||||
$table->bigInteger('costo_venta');
|
||||
$table->bigInteger('cuenta_corriente_factura');
|
||||
$table->bigInteger('cuenta_corriente_boleta');
|
||||
$table->bigInteger('cuenta_corriente_sin_respaldo');
|
||||
$table->bigInteger('cuenta_corriente_partime');
|
||||
$table->bigInteger('remuneraciones');
|
||||
$table->bigInteger('finiquitos');
|
||||
$table->bigInteger('aguinaldo');
|
||||
$table->bigInteger('bonos_personal');
|
||||
$table->bigInteger('honorarios_contador');
|
||||
$table->bigInteger('arriendo');
|
||||
$table->bigInteger('agua');
|
||||
$table->bigInteger('luz');
|
||||
$table->bigInteger('gas');
|
||||
$table->bigInteger('telefono');
|
||||
$table->bigInteger('otro_servicio');
|
||||
$table->decimal('ppm', 15, 2);
|
||||
$table->bigInteger('iva_a_favor');
|
||||
$table->bigInteger('dias_habiles');
|
||||
$table->bigInteger('dias_trabajados');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('estados_resultado');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('gastos_cuenta_corriente', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('valor');
|
||||
$table->text('descripcion');
|
||||
$table->text('tipo_gasto');
|
||||
$table->foreignId('estado_resultado_id')->constrained('estados_resultado')->cascadeOnDelete();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('gastos_cuenta_corriente');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('ingresos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('numero');
|
||||
$table->bigInteger('numero_z');
|
||||
$table->bigInteger('ingreso_inicial');
|
||||
$table->bigInteger('ingreso_final');
|
||||
$table->bigInteger('total');
|
||||
$table->text('tipo_ingreso');
|
||||
$table->foreignId('turno_id')->constrained('turnos')->cascadeOnDelete();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('ingresos');
|
||||
}
|
||||
};
|
||||
@@ -2,22 +2,11 @@
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\User;
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// User::factory(10)->create();
|
||||
|
||||
User::factory()->create([
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@example.com',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user