api code global jain

This commit is contained in:
Abhishek Mali
2025-11-05 10:37:10 +05:30
commit 52fe7e2bec
2834 changed files with 1784903 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateMessagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('messages', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('message_thread_id');
$table->unsignedBigInteger('user_id');
$table->text('message')->nullable();
$table->enum('type',[0,1])->comment("0=> Text, 1=>File")->default(0);
$table->enum('status',[0,1])->comment("0=> Unread, 1=>Read")->default(0);
$table->foreign('message_thread_id')->references('id')->on('message_threads');
$table->foreign('user_id')->references('id')->on('users');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('messages');
}
}