visuddhinanda 1 год назад
Родитель
Сommit
5a91ef9f23

+ 14 - 15
api-v8/database/migrations/2024_10_24_124140_create_tasks_table.php

@@ -33,32 +33,31 @@ class CreateTasksTable extends Migration
             $table->uuid('id')->primary()->default(DB::raw('uuid_generate_v1mc()'));
             $table->string('title', 512)->index();
             $table->string('type', 32)->index()->default('project');
-            $table->string('category', 256)->nullable()->index()->comment('类别,分类 审稿,百科 等');
+            $table->string('category', 256)->nullable()->index()->comment('类别: 翻译,审稿,百科 等');
             $table->text('summary')->nullable();
             $table->text('description')->nullable();
             $table->integer('weight')->index()->default(0)->comment('权重');
+            $table->integer('progress')->index()->default(0)->comment('进度0-100');
             $table->uuid('parent_id')->index()->nullable();
             $table->jsonb('assignees_id')->index()->nullable()->comment('责任人');
-            $table->jsonb('roles')->index()->nullable();
-            $table->uuid('executor_id')->index()->nullable();
+            $table->jsonb('roles')->index()->nullable()->comment('对于领取任务的人的角色要求');
+            $table->uuid('executor_id')->index()->nullable()->comment('实际执行人');
             $table->uuid('executor_relation_task_id')->index()->nullable();
             $table->uuid('project_id')->index();
-            $table->uuid('pre_task_id')->index()->nullable();
-            $table->uuid('next_task_id')->index()->nullable();
-            $table->boolean('is_milestone')->index()->default(false);
-            $table->uuid('owner_id')->index();
+            $table->boolean('is_milestone')->index()->default(false)->comment('是否是里程碑');
+            $table->uuid('owner_id')->index()->comment('任务拥有者:用户或者team-space');
             $table->uuid('creator_id')->index();
             $table->uuid('editor_id')->index();
-            $table->integer('order')->index()->default(1);
+            $table->integer('order')->index()->default(1)->comment('拖拽排序顺序');
             $table->string('status', 32)->index()->default('pending');
             $table->boolean('closed_by_subtask')->default(true);
-            $table->timestamp('started_at')->nullable()->index();
-            $table->timestamp('finished_at')->nullable()->index();
-            $table->timestamp('begin_at')->nullable()->index();
-            $table->timestamp('end_at')->nullable()->index();
-            $table->boolean('plan_with_time')->index()->default(false);
-            $table->boolean('hide_description_before_begin')->index()->default(false); //在开始时间之前隐藏描述
-            $table->text('script')->nullable();
+            $table->timestamp('started_at')->nullable()->index()->comment('实际开始时间');
+            $table->timestamp('finished_at')->nullable()->index()->comment('实际结束时间');
+            $table->timestamp('begin_at')->nullable()->index()->comment('计划开始时间');
+            $table->timestamp('end_at')->nullable()->index()->comment('计划结束时间');
+            $table->boolean('plan_with_time')->index()->default(false)->comment('计划时间包含时间');
+            $table->boolean('hide_description_before_begin')->index()->default(false)->comment('在开始时间之前隐藏描述');
+            $table->text('script')->nullable()->comment('lua脚本');
             $table->timestamps();
         });
     }

+ 1 - 0
api-v8/database/migrations/2024_10_25_015946_create_projects_table.php

@@ -20,6 +20,7 @@ class CreateProjectsTable extends Migration
             $table->string('type', 32)->index()->default('normal');
             $table->text('description')->nullable();
             $table->integer('weight')->index()->default(0)->comment('权重');
+            $table->integer('progress')->index()->default(0)->comment('进度0-100');
             $table->jsonb('executors_id')->index()->nullable();
             $table->uuid('parent_id')->index()->nullable();
             $table->jsonb('path')->index()->nullable();