12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?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('tasks', function (Blueprint $table) {
- $table->id();
- $table->string("name", 150);
- $table->integer("project_id");
- $table->integer("company_id");
- $table->integer("requirement_id")->nullable();
- $table->integer("naming_rule_id")->nullable();
- $table->integer("parent_id");
- $table->string("task_type", 50)->nullable();
- $table->string("doc_stage", 50)->nullable();
- $table->string("doc_type", 50)->nullable();
- $table->string("status")->default('wait')->comment('wait,doing,done,pause,cancel,closed');
- $table->integer("assign")->nullable();
- $table->text("description")->nullable();
- $table->date("begin")->nullable();
- $table->date("end")->nullable();
- $table->json('mailto')->nullable();
- $table->string('email_subject')->nullable();
- $table->string('acl')->default('private')->comment('private,custom');
- $table->string("whitelist")->nullable();
- $table->integer('closed_by')->nullable();
- $table->dateTime("closed_at")->nullable();
- $table->integer('canceled_by')->nullable();
- $table->dateTime("canceled_at")->nullable();
- $table->integer('approve_by')->nullable();
- $table->dateTime("approve_at")->nullable();
- $table->integer('finished_by')->nullable();
- $table->dateTime("finished_at")->nullable();
- $table->integer('review_by')->nullable();
- $table->dateTime("review_at")->nullable();
- $table->integer('created_by')->nullable();
- $table->json("custom_fields")->nullable();
- $table->softDeletes();
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('tasks');
- }
- };
|