feat: 工作流程状态支持仅限状态负责人修改

This commit is contained in:
kuaifan
2022-01-12 16:16:04 +08:00
parent f2180b22c7
commit f80b9cdca5
9 changed files with 83 additions and 13 deletions

View File

@@ -20,7 +20,7 @@ class CreateProjectFlowItemsTable extends Migration
$table->string('name', 50)->nullable()->default('')->comment('名称');
$table->string('status', 20)->nullable()->default('')->comment('状态');
$table->string('turns')->nullable()->default('')->comment('可流转');
$table->string('userids')->nullable()->default('')->comment('自动负责人ID');
$table->string('userids')->nullable()->default('')->comment('状态负责人ID');
$table->integer('sort')->nullable()->comment('排序');
$table->timestamps();
});

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class ProjectFlowItemsAddUserlimit extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('project_flow_items', function (Blueprint $table) {
if (!Schema::hasColumn('project_flow_items', 'userlimit')) {
$table->tinyInteger('userlimit')->nullable()->default(0)->after('usertype')->comment('限制负责人');
}
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('project_flow_items', function (Blueprint $table) {
$table->dropColumn("userlimit");
});
}
}