Merge branch 'develop' into feature/CheckPaymentHarim

This commit is contained in:
Amir Ghasempoor
2025-11-09 15:55:41 +03:30
committed by GitHub
12 changed files with 156 additions and 65 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\PanjarehVahedHistory>
*/
class PanjarehVahedHistoryFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
//
];
}
}

View File

@@ -13,7 +13,6 @@ return new class extends Migration
{
Schema::table('harims', function (Blueprint $table) {
$table->longText('data')->nullable();
$table->string('token', 255)->nullable();
});
}
@@ -23,7 +22,7 @@ return new class extends Migration
public function down(): void
{
Schema::table('harims', function (Blueprint $table) {
$table->dropColumn(['data', 'token']);
$table->dropColumn('data');
});
}
};

View File

@@ -0,0 +1,30 @@
<?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('panjareh_vahed_histories', function (Blueprint $table) {
$table->id();
$table->foreignId('harim_id')->constrained('harims');
$table->longText('data');
$table->tinyInteger('action')->default(0); // 0 => receive, 1 => send
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('panjareh_vahed_histories');
}
};

View File

@@ -0,0 +1,17 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class PanjarehVahedHistorySeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
//
}
}