fulinqingjie/database/migrations/2026_02_21_200136_create_co...

34 lines
1.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?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('contacts', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable()->comment('姓名');
$table->string('phone')->nullable()->comment('电话');
$table->string('company')->nullable()->comment('公司名称');
$table->unsignedTinyInteger('type')->nullable()->comment('业务需求');
$table->string('content')->nullable()->comment('项目概况与备注');
$table->unsignedTinyInteger('is_handle')->default(0)->comment('状态0未处理1已处理');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('contacts');
}
};