add banks, payment purpose and user company tables
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\PaymentPurposeCode\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PaymentPurposeCodeController 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,29 @@
|
||||
<?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('payment_purpose_codes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable()->index();
|
||||
$table->string('code')->nullable()->unique();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('payment_purpose_codes');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\PaymentPurposeCode\Database\Seeders;
|
||||
|
||||
use App\Modules\PaymentPurposeCode\Models\PaymentPurposeCode;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
||||
class PaymentPurposeCodeSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$data = collect(File::json(__DIR__.'/../../Resources/Data/data.json'));
|
||||
|
||||
$data->each(function ($item) {
|
||||
PaymentPurposeCode::create(['code' => $item['key'], 'name' => $item['value']]);
|
||||
});
|
||||
}
|
||||
}
|
||||
18
app/Modules/PaymentPurposeCode/Models/PaymentPurposeCode.php
Normal file
18
app/Modules/PaymentPurposeCode/Models/PaymentPurposeCode.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\PaymentPurposeCode\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $code
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property Carbon\Carbon $updated_at
|
||||
*/
|
||||
class PaymentPurposeCode extends Model
|
||||
{
|
||||
|
||||
}
|
||||
48
app/Modules/PaymentPurposeCode/PaymentPurposeCodeModule.php
Normal file
48
app/Modules/PaymentPurposeCode/PaymentPurposeCodeModule.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\PaymentPurposeCode;
|
||||
|
||||
use App\Modules\Makeable;
|
||||
use App\Modules\ModuleContract;
|
||||
|
||||
class PaymentPurposeCodeModule 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 true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\PaymentPurposeCode\Repositories;
|
||||
|
||||
use App\Modules\PaymentPurposeCode\Models\PaymentPurposeCode;
|
||||
|
||||
class PaymentPurposeCodeRepository
|
||||
{
|
||||
|
||||
}
|
||||
BIN
app/Modules/PaymentPurposeCode/Resources/.DS_Store
vendored
Normal file
BIN
app/Modules/PaymentPurposeCode/Resources/.DS_Store
vendored
Normal file
Binary file not shown.
1
app/Modules/PaymentPurposeCode/Resources/Data/data.json
Normal file
1
app/Modules/PaymentPurposeCode/Resources/Data/data.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user