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'); } };