add visa
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\VisaMasterPaymentOrder\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class VisaMasterPaymentOrderController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index(Request $request): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(Request $request): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(Request $request): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?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('visa_master_payment_orders', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('unique_id')->nullable()->unique();
|
||||
|
||||
$table->string('type')->nullable();
|
||||
$table->string('passport_name')->nullable();
|
||||
$table->string('passport_surname')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->string('email')->nullable();
|
||||
$table->string('region')->nullable();
|
||||
|
||||
$table->foreignId('branch_id')->nullable()->constrained('branches')->cascadeOnDelete();
|
||||
$table->foreignId('user_id')->nullable()->constrained('users')->cascadeOnDelete();
|
||||
|
||||
$table->string('address')->nullable();
|
||||
|
||||
$table->json('sender_datas')->nullable();
|
||||
$table->json('payment_reciever')->nullable();
|
||||
|
||||
$table->json('documents')->nullable();
|
||||
|
||||
$table->string('status')->nullable();
|
||||
$table->string('notes')->nullable();
|
||||
|
||||
$table->string('sender_full_name')->nullable();
|
||||
$table->string('sender_passport_serie')->nullable();
|
||||
$table->string('sender_passport_number')->nullable();
|
||||
$table->string('sender_deposit_account')->nullable();
|
||||
|
||||
$table->boolean('paid')->default(true);
|
||||
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,195 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\VisaMasterPaymentOrder\Models;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Modules\Branch\Models\Branch;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Spatie\MediaLibrary\HasMedia;
|
||||
use Spatie\MediaLibrary\InteractsWithMedia;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $unique_id
|
||||
* @property string $type
|
||||
* @property string $passport_name
|
||||
* @property string $passport_surname
|
||||
* @property string $phone
|
||||
* @property string $email
|
||||
* @property string $region
|
||||
* @property string $address
|
||||
* @property array $sender_datas
|
||||
* @property array $payment_reciever
|
||||
* @property array $documents
|
||||
* @property string $status
|
||||
* @property string $notes
|
||||
* @property string $sender_full_name
|
||||
* @property string $sender_passport_serie
|
||||
* @property string $sender_passport_number
|
||||
* @property string $sender_deposit_account
|
||||
* @property bool $paid
|
||||
* @property \Illuminate\Support\Carbon $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
*/
|
||||
class VisaMasterPaymentOrder extends Model implements HasMedia
|
||||
{
|
||||
use InteractsWithMedia;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'visa_master_payment_orders';
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'sender_datas' => 'array',
|
||||
'payment_reciever' => 'array',
|
||||
];
|
||||
|
||||
/**
|
||||
* Media collections
|
||||
*/
|
||||
public function registerMediaCollections(): void
|
||||
{
|
||||
$this->addMediaCollection('receiver_requisite')->singleFile();
|
||||
$this->addMediaCollection('receiver_document_stating_he_is_studying')->singleFile();
|
||||
$this->addMediaCollection('receiver_ticket')->singleFile();
|
||||
$this->addMediaCollection('receiver_passport_local')->singleFile();
|
||||
$this->addMediaCollection('receiver_passport_international')->singleFile();
|
||||
$this->addMediaCollection('receiver_visa')->singleFile();
|
||||
$this->addMediaCollection('receiver_travel_stamp_on_passport')->singleFile();
|
||||
$this->addMediaCollection('receiver_document_stating_he_is_studying_2')->singleFile();
|
||||
|
||||
$this->addMediaCollection('sender_passport_local')->singleFile();
|
||||
$this->addMediaCollection('sender_passport_international')->singleFile();
|
||||
$this->addMediaCollection('sender_travel_stamp_on_passport')->singleFile();
|
||||
$this->addMediaCollection('sender_proof_of_kinship')->singleFile();
|
||||
$this->addMediaCollection('sender_passport_local_old')->singleFile();
|
||||
$this->addMediaCollection('sender_passport_local_old_replacement')->singleFile();
|
||||
}
|
||||
|
||||
/**
|
||||
* User
|
||||
*
|
||||
* @return BelongsTo<User, VisaMasterPaymentOrder>
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Branch
|
||||
*
|
||||
* @return BelongsTo<Branch, VisaMasterPaymentOrder>
|
||||
*/
|
||||
public function branch(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Branch::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get applications types
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function applicationTypes(): array
|
||||
{
|
||||
return [
|
||||
'visa' => __('Visa'),
|
||||
'master' => __('Master'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Required files
|
||||
*
|
||||
* @return array<int, array<string, bool|string>>
|
||||
*/
|
||||
public static function reciverFiles(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
'required' => true,
|
||||
'code' => 'requisite',
|
||||
'name' => 'Talyba degişli walýuta “VISA” kartyň rekwizitleri',
|
||||
],
|
||||
[
|
||||
'required' => false,
|
||||
'code' => 'document_stating_he_is_studying',
|
||||
'name' => 'Talybyň daşary ýurt döwletiniň ýokary okuw mekdebinde okaýandygy baradaky güwänamasy',
|
||||
],
|
||||
[
|
||||
'required' => false,
|
||||
'code' => 'passport_local',
|
||||
'name' => 'Talyba degişli Türkmenistanyň raýatynyň (içki milli) pasportynyň asyl görnüşi we göçürmesi',
|
||||
],
|
||||
[
|
||||
'required' => false,
|
||||
'code' => 'passport_international',
|
||||
'name' => 'Talybyň Türkmenistandan çykmak we Türkmenistana girmek üçin (zagran) pasportynyň göçürmesi',
|
||||
],
|
||||
[
|
||||
'required' => false,
|
||||
'code' => 'visa',
|
||||
'name' => 'Talybyň Türkmenistandan çykmak we Türkmenistana girmek üçin pasportyndaky daşary ýurtda galyp okap bilýändigi baradaky berlen möhleti hereket edýän rugsatnamasynyň (wizasynyň) bellenen sahypasynyň göçürmesi',
|
||||
],
|
||||
[
|
||||
'required' => false,
|
||||
'code' => 'travel_stamp_on_passport',
|
||||
'name' => 'Talybyň Türkmenistandan çykmak we Türkmenistana girmek üçin pasportyndaky Türkmenistandan çykandygy we daşary ýurt döwletine girendigi baradaky ştamplaryň (seneli ştampyň) bellenen sahypasynyň göçürmesi',
|
||||
],
|
||||
[
|
||||
'required' => false,
|
||||
'code' => 'document_stating_he_is_studying_2',
|
||||
'name' => 'Talybyň daşary ýurt döwletiniň ýokary okuw mekdebinde okaýandygy baradaky güwänamasyndaky maglumatyň doly takyk däl ýagdaýynda takyk däl maglumatyň sebäpleri baradaky daşary ýurt döwletiniň ýokary okuw mekdebinden haty',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sender files
|
||||
*
|
||||
* @return array<int, array<string, bool|string>>
|
||||
*/
|
||||
public static function senderFiles(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
'required' => true,
|
||||
'code' => 'passport_local',
|
||||
'name' => 'Ugradyja degişli Türkmenistanyň raýatynyň (içki milli) pasportynyň asyl görnüşi we göçürmesi',
|
||||
],
|
||||
[
|
||||
'required' => false,
|
||||
'code' => 'passport_international',
|
||||
'name' => 'Ugradyja degişli Türkmenistandan çykmak we Türkmenistana girmek üçin pasportynyň asyl görnüşi we göçürmesi',
|
||||
],
|
||||
[
|
||||
'required' => false,
|
||||
'code' => 'travel_stamp_on_passport',
|
||||
'name' => 'Ugradyja degişli Türkmenistandan çykmak we Türkmenistana girmek üçin pasportyndaky daşary döwletine gidendigi we daşary döwlete barandygy baradaky (ştampyň) bellenen sahypasynyň göçürmesi',
|
||||
],
|
||||
[
|
||||
'required' => true,
|
||||
'code' => 'proof_of_kinship',
|
||||
'name' => 'Ugradyjynyň we kabul edijiniň (talybyň) özara garyndaşlyk derejesini tassyklaýjy resminamalarynyň göçürmesi',
|
||||
],
|
||||
[
|
||||
'required' => false,
|
||||
'code' => 'passport_local_old',
|
||||
'name' => 'Ugradyjy we kabul ediji (talyp) 2015-nji ýyldan soňra Türkmenistanyň raýatynyň pasportyny ikinji gezek alan bolsa, onda birinji gezek alan pasportynyň seriýasy baradaky maglumat',
|
||||
],
|
||||
[
|
||||
'required' => false,
|
||||
'code' => 'passport_local_old_replacement',
|
||||
'name' => 'Ugradyjy we kabul ediji (talyp) 2015-nji ýyldan soňra Türkmenistanyň raýatynyň pasportyny ikinji gezek alandan soňra birinji gezek alan pasportynyň seriýasy baradaky maglumaty bilmeýän ,bolsa onda polisiýanyň degişli edaralaryndan birinji alan pasportynyň seriýasy baradaky güwänamasy',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\VisaMasterPaymentOrder\Repositories;
|
||||
|
||||
class VisaMasterPaymentOrderRepository {}
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\VisaMasterPaymentOrder;
|
||||
|
||||
use App\Modules\Makeable;
|
||||
use App\Modules\ModuleContract;
|
||||
|
||||
class VisaMasterPaymentOrderModule implements ModuleContract
|
||||
{
|
||||
use Makeable;
|
||||
|
||||
/**
|
||||
* Module is enabled
|
||||
*/
|
||||
protected bool $enabled = true;
|
||||
|
||||
/**
|
||||
* Check if is module enabled
|
||||
*/
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return $this->enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable module
|
||||
*/
|
||||
public function disable(): void
|
||||
{
|
||||
$this->enabled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable module
|
||||
*/
|
||||
public function enable(): void
|
||||
{
|
||||
$this->enabled = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if module has a filament resource
|
||||
*/
|
||||
public function hasFilamentResource(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get module composer requirements
|
||||
*/
|
||||
public function getComposerRequirements(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get module composer suggestions
|
||||
*/
|
||||
public function getComposerSuggestions(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user