Compare commits

...

14 Commits

Author SHA1 Message Date
5c757e1823 create seeder for city and province 2026-05-23 15:13:12 +03:30
9ad3d6cea0 create show for city and province 2026-05-23 14:03:10 +03:30
8554f4cc55 create list for city and province 2026-05-23 13:49:09 +03:30
5e48777e1c create list for city and province 2026-05-23 13:45:05 +03:30
5b79cefe28 create Enum and seeder for BusinessType and payment_statuses 2026-05-18 16:28:58 +03:30
41b7ead69e Merge pull request 'separate any gateways' (#19) from feature/PaymentModel into develop
Reviewed-on: #19
2026-05-18 11:10:23 +00:00
5ea986db40 separate any gateways 2026-05-18 14:34:28 +03:30
f3a9b5e788 Merge pull request 'create payment and gateway resources' (#17) from feature/PaymentModel into develop
Reviewed-on: #17
2026-05-17 10:31:08 +00:00
d04277ece5 add gaurded values 2026-05-17 14:00:33 +03:30
e53a89016f create payment and gateway resources 2026-05-17 13:57:39 +03:30
53f2303253 Merge pull request 'upload files' (#16) from feature/UploadDoc into develop
Reviewed-on: #16
2026-05-17 05:26:22 +00:00
c6dc5256e6 resolve the conflicts 2026-05-17 08:56:02 +03:30
19abb28acf upload files 2026-05-17 08:49:28 +03:30
431acd9279 Merge pull request 'feature/FixManagment' (#14) from feature/FixManagment into develop
Reviewed-on: #14
2026-05-16 11:31:59 +00:00
182 changed files with 940 additions and 88 deletions

0
backend/.dockerignore Normal file → Executable file
View File

0
backend/.editorconfig Normal file → Executable file
View File

0
backend/.env.example Normal file → Executable file
View File

0
backend/.gitattributes vendored Normal file → Executable file
View File

0
backend/.gitignore vendored Normal file → Executable file
View File

0
backend/.npmrc Normal file → Executable file
View File

0
backend/Dockerfile Normal file → Executable file
View File

0
backend/Dockerfile.production Normal file → Executable file
View File

0
backend/README.md Normal file → Executable file
View File

0
backend/app/Admin/Controllers/AuthController.php Normal file → Executable file
View File

View File

View File

View File

0
backend/app/Admin/Controllers/ProfileController.php Normal file → Executable file
View File

View File

0
backend/app/Admin/Requests/Auth/LoginRequest.php Normal file → Executable file
View File

0
backend/app/Admin/Requests/Auth/RegisterRequest.php Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
backend/app/Admin/Resources/ExpertResource.php Normal file → Executable file
View File

View File

@@ -0,0 +1,43 @@
<?php
namespace App\Enums;
enum BusinessTypeEnum: int
{
case MEDICAL = 1;
case LEGAL = 2;
case ENGINEERING = 3;
case EDUCATION = 4;
case CONSULTING = 5;
case BEAUTY = 6;
case TECHNICAL_SERVICES = 7;
case FINANCIAL = 8;
case REAL_ESTATE = 9;
case RESTAURANT = 10;
case SHOP = 11;
case TRANSPORTATION = 12;
case ART = 13;
case SPORT = 14;
case OTHER = 15;
public function label(): string
{
return match ($this) {
self::MEDICAL => 'medical',
self::LEGAL => 'legal',
self::ENGINEERING => 'engineering',
self::EDUCATION => 'education',
self::CONSULTING => 'consulting',
self::BEAUTY => 'beauty',
self::TECHNICAL_SERVICES => 'technical_services',
self::FINANCIAL => 'financial',
self::REAL_ESTATE => 'real_estate',
self::RESTAURANT => 'restaurant',
self::SHOP => 'shop',
self::TRANSPORTATION => 'transportation',
self::ART => 'art',
self::SPORT => 'sport',
self::OTHER => 'other',
};
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Enums;
enum PaymentStatusEnum:int
{
case Unpaid = 0;
case Cancelled = 1;
case Expired = 2;
case Paid = 3;
case Refunded = 4;
public function label(): string
{
return match ($this) {
self::Unpaid => 'unpaid',
self::Cancelled => 'cancelled',
self::Expired => 'expired',
self::Paid => 'paid',
self::Refunded => 'refunded',
};
}
}

0
backend/app/Facades/DataTable/DataTable.php Normal file → Executable file
View File

0
backend/app/Facades/DataTable/DataTableFacade.php Normal file → Executable file
View File

0
backend/app/Facades/File/File.php Normal file → Executable file
View File

0
backend/app/Facades/File/FileFacade.php Normal file → Executable file
View File

0
backend/app/Http/Controllers/Controller.php Normal file → Executable file
View File

0
backend/app/Mail/LoginNotificationMail.php Normal file → Executable file
View File

View File

@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Database\Factories\BusinessTypeFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class BusinessType extends Model
{
/** @use HasFactory<BusinessTypeFactory> */
use HasFactory;
protected $guarded = ['id'];
}

0
backend/app/Models/City.php Normal file → Executable file
View File

0
backend/app/Models/Document.php Normal file → Executable file
View File

0
backend/app/Models/Expert.php Normal file → Executable file
View File

View File

@@ -0,0 +1,12 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class FibTransaction extends Model
{
/** @use HasFactory<\Database\Factories\FibTransactionFactory> */
use HasFactory;
}

View File

@@ -0,0 +1,12 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class FibTransactionStatus extends Model
{
/** @use HasFactory<\Database\Factories\FibTransactionStatusFactory> */
use HasFactory;
}

View File

@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Database\Factories\PaymentFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Payment extends Model
{
/** @use HasFactory<PaymentFactory> */
use HasFactory;
protected $guarded = ['id'];
}

View File

@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Database\Factories\PaymentStatusFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class PaymentStatus extends Model
{
/** @use HasFactory<PaymentStatusFactory> */
use HasFactory;
protected $guarded = ['id'];
}

0
backend/app/Models/Province.php Normal file → Executable file
View File

View File

@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Database\Factories\TransactionFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Transaction extends Model
{
/** @use HasFactory<TransactionFactory> */
use HasFactory;
protected $guarded = ['id'];
}

View File

@@ -10,6 +10,8 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\MorphToMany;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\Hash;
use Laravel\Passport\Bridge\Client;
use Laravel\Passport\HasApiTokens;
#[Guarded(['id'])]
@@ -24,4 +26,14 @@ class User extends Authenticatable
{
return $this->morphToMany(Document::class, 'documentable');
}
public function validateForPassportPasswordGrant(string $password): bool
{
return Hash::check($password, $this->password);
}
public function findForPassport(string $username, Client $client): User
{
return $this->where('username', $username)->first();
}
}

View File

@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Database\Factories\UserGatewayFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class UserGateway extends Model
{
/** @use HasFactory<UserGatewayFactory> */
use HasFactory;
protected $guarded = ['id'];
}

View File

@@ -22,6 +22,8 @@ class AppServiceProvider extends ServiceProvider
public function boot(): void
{
Passport::enablePasswordGrant();
Passport::tokensExpireIn(CarbonInterval::minutes(1));
Passport::refreshTokensExpireIn(CarbonInterval::minutes(5));
Passport::personalAccessTokensExpireIn(CarbonInterval::minutes(1));
}
}

0
backend/app/Providers/DataTableServiceProvider.php Normal file → Executable file
View File

0
backend/app/Providers/FileServiceProvider.php Normal file → Executable file
View File

0
backend/app/Services/DataTable/DataTableInput.php Normal file → Executable file
View File

0
backend/app/Services/DataTable/DataTableService.php Normal file → Executable file
View File

0
backend/app/Services/DataTable/Enums/DataType.php Normal file → Executable file
View File

0
backend/app/Services/DataTable/Enums/SearchType.php Normal file → Executable file
View File

View File

View File

View File

0
backend/app/Services/DataTable/Filter/ApplyFilter.php Normal file → Executable file
View File

0
backend/app/Services/DataTable/Filter/Filter.php Normal file → Executable file
View File

View File

View File

0
backend/app/Services/DataTable/Sort/ApplySort.php Normal file → Executable file
View File

0
backend/app/Services/DataTable/Sort/Sort.php Normal file → Executable file
View File

View File

View File

View File

View File

@@ -1,6 +1,6 @@
<?php
namespace App\User\Services\FIB;
namespace App\Services\FIB;
use Exception;
use Illuminate\Http\Client\ConnectionException;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\User\Services\FIB;
namespace App\Services\FIB;
use Exception;
use Illuminate\Http\Client\ConnectionException;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\User\Services\FIB;
namespace App\Services\FIB;
use Exception;
use Illuminate\Http\Client\ConnectionException;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\User\Services\FIB;
namespace App\Services\FIB;
use Exception;
use Illuminate\Http\Client\ConnectionException;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\User\Services\FIB;
namespace App\Services\FIB;
use Exception;
use Illuminate\Http\Client\ConnectionException;

0
backend/app/User/Controllers/AuthController.php Normal file → Executable file
View File

View File

@@ -0,0 +1,18 @@
<?php
namespace App\User\Controllers;
use App\Http\Controllers\Controller;
use App\Models\City;
use App\Traits\ApiResponse;
use Illuminate\Http\JsonResponse;
class CityController extends Controller
{
use ApiResponse;
public function list(): JsonResponse
{
return response()->json(City::all(['id', 'name']));
}
}

View File

@@ -1,14 +0,0 @@
<?php
namespace App\User\Controllers\Dashboard;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class ConfirmController extends Controller
{
public function index()
{
//
}
}

View File

@@ -1,24 +0,0 @@
<?php
namespace App\User\Controller\Dashboard;
use App\Http\Controllers\Controller;
use App\Traits\ApiResponse;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class DocumentationController extends Controller
{
use ApiResponse;
public function store(StoreRequest $request): jsonResponse
{
//
}
public function update(UpdateRequest $request): JsonResponse
{
//
}
}

View File

@@ -0,0 +1,42 @@
<?php
namespace App\User\Controllers;
use App\Facades\File\FileFacade;
use App\Http\Controllers\Controller;
use App\Traits\ApiResponse;
use App\User\Requests\Documentation\EditRequest;
use App\User\Requests\Documentation\UploadRequest;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class DocumentationController extends Controller
{
use ApiResponse;
public function upload(UploadRequest $request): jsonResponse
{
$user = Auth::guard('web')->user();
foreach ($request->documents as $document) {
$user->documents()->create([
'title' => $document['title'],
'url' => FileFacade::save($document['file'], "/{$user->id}/documents", $document['title']),
]);
}
return $this->successResponse();
}
public function edit(EditRequest $request): JsonResponse
{
$user = Auth::guard('web')->user();
foreach ($request->documents as $document) {
$user->documents()->sync();
}
return $this->successResponse();
}
}

0
backend/app/User/Controllers/ProfileController.php Normal file → Executable file
View File

View File

@@ -0,0 +1,17 @@
<?php
namespace App\User\Controllers;
use App\Http\Controllers\Controller;
use App\Models\Province;
use App\Traits\ApiResponse;
use Illuminate\Http\JsonResponse;
class ProvinceController extends Controller
{
use ApiResponse;
public function list(): JsonResponse
{
return response()->json(Province::all(['id', 'name']));
}
}

0
backend/app/User/Requests/Auth/LoginRequest.php Normal file → Executable file
View File

0
backend/app/User/Requests/Auth/RegisterRequest.php Normal file → Executable file
View File

View File

@@ -0,0 +1,31 @@
<?php
namespace App\User\Requests\Documentation;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class EditRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, ValidationRule|array|string>
*/
public function rules(): array
{
return [
'documents' => 'required|array',
'documents.*.file' => 'required|file|mimes:pdf,jpg,jpeg,png|max:2048',
'documents.*.title' => 'required|string',
];
}
}

View File

@@ -0,0 +1,31 @@
<?php
namespace App\User\Requests\Documentation;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class UploadRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, ValidationRule|array|string>
*/
public function rules(): array
{
return [
'documents' => 'required|array',
'documents.*.file' => 'required|file|mimes:pdf,jpg,jpeg,png|max:2048',
'documents.*.title' => 'required|string',
];
}
}

View File

0
backend/app/User/Requests/Profile/EditRequest.php Normal file → Executable file
View File

0
backend/app/User/Resources/UserResource.php Normal file → Executable file
View File

0
backend/artisan Normal file → Executable file
View File

0
backend/bootstrap/providers.php Normal file → Executable file
View File

0
backend/composer.json Normal file → Executable file
View File

0
backend/composer.lock generated Normal file → Executable file
View File

0
backend/config/app.php Normal file → Executable file
View File

0
backend/config/cache.php Normal file → Executable file
View File

Some files were not shown because too many files have changed in this diff Show More