<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateProcurementCheckSheetsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('procurement_check_sheets', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('procurement_delivery_id')->index()->comment('外键采购送货单');
            $table->integer('invoice_number')->nullable()->comment('发票号');
            $table->decimal('account_payable',10,4)->comment('应付款');
            $table->tinyInteger('status')->default(0)->comment('状态');
            $table->bigInteger('auditor')->index()->comment('出纳审核人');
            $table->timestamps();
        });
    }

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