2024_11_14_120000_create_user_feedbacks_table.php 816 B

123456789101112131415161718192021222324252627
  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. public function up()
  8. {
  9. Schema::create('user_feedbacks', function (Blueprint $table) {
  10. $table->comment('用户反馈');
  11. $table->increments('id');
  12. $table->unsignedBigInteger('owner_id')->comment('用户编号');
  13. $table->string('owner_type')->comment('用户类型');
  14. $table->text('content')->comment('反馈内容');
  15. $table->string('state')->default('enable')->comment('状态');
  16. $table->timestamps();
  17. $table->softDeletes();
  18. });
  19. }
  20. public function down()
  21. {
  22. Schema::dropIfExists('user_feedbacks');
  23. }
  24. };