OpenOA开发
任务id/id/increments
任务名称/title/string
发起人id/initiator_id/integer
执行人id/executor_id/integer
markdown内容/mdcontent/mediumText
富文本内容/htmlcontent/mediumText
当前状态/state/integer
公开度/openness/integer
迁移命令模板:
1.php artisan make:migration create_task_table
2.php artisan migrate
迁移文件模板:
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tasks', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->integer('initiator_id');
$table->integer('executor_id');
$table->mediumText('mdcontent')->nullable();
$table->mediumText('htmlcontent')->nullable();
$table->integer('state')->default('1');
$table->integer('openness')->default('1');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('tasks');
}
};
php artisan make:controller index/TaskController
php artisan make:model Task
发布时间/initiationtime/timestamp
计划完成时间/timestamp
实际完成时间/Actual deadline/timestamp
停止时间/Actual deadline/timestamp
暂停开始时间
暂停恢复时间