35 lines
909 B
PHP
35 lines
909 B
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('transaksis', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('id_kasir')->constrained('users');
|
|
$table->foreignId('id_sales')->nullable()->constrained('sales');
|
|
$table->string('nama_sales', 100);
|
|
$table->string('no_hp', 20);
|
|
$table->string('alamat', 100);
|
|
$table->double('ongkos_bikin')->nullable();
|
|
$table->double('total_harga');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('transaksis');
|
|
}
|
|
};
|