2021_03_18_162505_create_discharge_tasks_table.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateDischargeTasksTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('discharge_tasks', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->bigInteger('owner_id')->comment('货主id');
  17. $table->bigInteger('facilitator_id')->default(null)->comment('服务商');
  18. $table->tinyInteger('type')->comment('作业名称');
  19. $table->string('numbers')->comment('入库单号');
  20. $table->tinyInteger('status')->comment('状态');
  21. $table->integer('income_amount')->comment('收入数量');
  22. $table->tinyInteger('income_unit')->comment('收入单位');
  23. $table->decimal('income_unit_price')->comment('收入单价');
  24. $table->decimal('income_total_cost')->comment('收入合计');
  25. $table->string('income_remark')->comment('收入描述');
  26. $table->timestamp('income_at')->comment('任务创建时间');
  27. $table->integer('expenditure_amount')->comment('支出数量');
  28. $table->tinyInteger('expenditure_unit')->comment('支出单位');
  29. $table->decimal('expenditure_unit_price')->comment('支出单价');
  30. $table->decimal('expenditure_total_cost')->comment('支出合计');
  31. $table->string('expenditure_remark')->comment('支出描述');
  32. $table->timestamp('expenditure_at')->comment('任务接受时间');
  33. $table->timestamps();
  34. });
  35. }
  36. /**
  37. * Reverse the migrations.
  38. *
  39. * @return void
  40. */
  41. public function down()
  42. {
  43. Schema::dropIfExists('discharge_tasks');
  44. }
  45. }