2024_09_04_065901_create_member_config_table.php 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration {
  6. /**
  7. * Run the migrations.
  8. */
  9. public function up(): void
  10. {
  11. Schema::create('member_config', function (Blueprint $table) {
  12. $table->id();
  13. $table->tinyInteger('point_trade_deduct_enable')->comment('是否开启积分抵扣');
  14. $table->integer('point_trade_deduct_unit_price')->comment('积分抵扣(单位:分)');
  15. $table->integer('point_trade_deduct_max_price')->nullable()->comment('积分抵扣最大值');
  16. $table->bigInteger('point_trade_give_point')->nullable()->comment('1 元赠送多少分');
  17. $table->string('creator', 64)->nullable()->comment('创建者');
  18. $table->string('updater', 64)->nullable()->comment('更新者');
  19. $table->timestamps();
  20. $table->softDeletes();
  21. });
  22. }
  23. /**
  24. * Reverse the migrations.
  25. */
  26. public function down(): void
  27. {
  28. Schema::dropIfExists('member_config');
  29. }
  30. };