OwlCyberSecurity - MANAGER
Edit File: 2024_02_20_154542_create_invoices_tara_table.php
<?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('invoices_tara', function (Blueprint $table) { $table->id(); $table->enum('status', ['در حال بررسی','پیش فاکتور ارسال شد در انتظار پرداخت','در حال خرید','خریداری شده','تحویل دفتر ایران','تحویل مشتری','کنسل'])->nullable(); $table->timestamp('lastmodifydate')->nullable(); $table->timestamp('invoicedate')->nullable(); $table->string('code', 15); $table->enum('orderlevel', ['در حال بررسی','در انتظار پرداخت','پرداخت شده','ارسال به مشتری','تحویل مشتری','نامشخص'])->nullable(); $table->decimal('price', 18, 2); $table->timestamp('submitdate')->nullable(); $table->string('description', 1000)->nullable(); $table->unsignedBigInteger('agent_id')->nullable(); $table->unsignedBigInteger('user_id'); $table->unsignedBigInteger('address_id')->nullable(); $table->timestamp('deleted_at')->nullable(); $table->timestamps(); $table->text('cancel_description')->nullable(); $table->tinyInteger('submit_factor')->nullable()->default(0); $table->bigInteger('totalTax')->nullable(); $table->bigInteger('finalTotalTax')->nullable(); $table->tinyInteger('ischecked'); $table->tinyInteger('isapproved'); $table->unique('code'); $table->index(['status', 'code', 'orderlevel', 'invoicedate']); $table->index('code', 'code'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('invoices_tara'); } };