2021_08_13_093747_create_owner_fee_operations.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateOwnerFeeOperations extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('owner_fee_operations', function (Blueprint $table) {
  15. $table->id();
  16. $table->bigInteger("owner_id")->index()->comment("货主ID");
  17. $table->date("worked_at")->comment("作业时间");
  18. $table->bigInteger("model_id")->comment("外联计费模型");
  19. $table->string("source_number")->nullable()->comment("上游单号");
  20. $table->string("doc_number")->comment("单据单号");
  21. $table->bigInteger("commodity_id")->comment("外键商品");
  22. $table->decimal("total_fee",10,3)->comment("总价");
  23. $table->decimal("tax_rate",10,3)->nullable()->comment("税率");
  24. $table->text("fee_description")->nullable()->comment("描述");
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('owner_fee_operations');
  35. }
  36. }