Feat: Activites Organised

This commit is contained in:
Sallu9007
2025-03-24 01:54:58 +05:30
parent 4352abdbd1
commit 98522c4213
12 changed files with 1061 additions and 10 deletions

View File

@@ -0,0 +1,46 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('activities_organiseds', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->string('resource_person_name');
$table->text('resource_person_organization');
$table->string('target_audience');
$table->integer('number_of_participants');
$table->text('objective');
$table->text('outcomes');
$table->unsignedBigInteger('department_id');
$table->unsignedBigInteger('faculty_id'); // assuming faculty_id refers to user_id
$table->dateTime('start_date');
$table->dateTime('end_date');
$table->integer('num_days');
$table->string('venue');
$table->string('activity_type');
$table->string('category');
$table->string('level');
$table->string('proof')->nullable(); // For file path
$table->foreign('faculty_id')->references('id')->on('users')->onDelete('cascade');
$table->foreign('department_id')->references('id')->on('departments')->onDelete('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('activities_organiseds');
}
};