| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateOwnerFeeOperations extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('owner_fee_operations', function (Blueprint $table) {
- $table->id();
- $table->bigInteger("owner_id")->index()->comment("货主ID");
- $table->date("worked_at")->comment("作业时间");
- $table->bigInteger("model_id")->comment("外联计费模型");
- $table->string("source_number")->nullable()->comment("上游单号");
- $table->string("doc_number")->comment("单据单号");
- $table->bigInteger("commodity_id")->comment("外键商品");
- $table->decimal("total_fee",10,3)->comment("总价");
- $table->decimal("tax_rate",10,3)->nullable()->comment("税率");
- $table->text("fee_description")->nullable()->comment("描述");
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('owner_fee_operations');
- }
- }
|