<?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('movimientos', function (Blueprint $table) {
            $table->id();
            $table->string('codigo',20);
            $table->float('precio_venta',30)->nullable();
            $table->float('pago_efectivo',30)->nullable();
            $table->float('pago_tarjeta',30)->nullable();
            $table->float('pago_vales',30)->nullable();
            $table->float('pago_transferencia',30)->nullable();
            $table->unsignedBigInteger('estado_movimiento_id');
            $table->foreign('estado_movimiento_id')->on('estado_movimientos')->references('id');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('movimientos');
    }
};
