added attendance and fixed body composition
This commit is contained in:
1 parent
87051e179d
commit
125e1c34af
8 files changed
+293
-4
No files matched your search
@@ -0,0 +1,35 @@
|
||||
<?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('attendance_records', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->constrained()->onDelete('cascade');
|
||||
$table->foreignId('tenant_id')->constrained()->onDelete('cascade');
|
||||
$table->string('member_type')->default('Basic'); // Premium, Basic, Student, Family
|
||||
$table->datetime('check_in_time');
|
||||
$table->datetime('check_out_time')->nullable();
|
||||
$table->string('duration')->nullable(); // e.g., "1h 45m"
|
||||
$table->string('activity'); // e.g., "Gym Floor", "Yoga Class"
|
||||
$table->enum('status', ['active', 'completed'])->default('active');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('attendance_records');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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('members_attendance', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('member_id')->constrained('users')->onDelete('cascade');
|
||||
$table->string('session_type'); // e.g. Personal Training, Group Fitness, Yoga, Pilates
|
||||
$table->string('trainer_name');
|
||||
$table->datetime('session_datetime');
|
||||
$table->enum('status', ['completed', 'no_show']);
|
||||
$table->text('notes')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('members_attendance');
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user