migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Restaurant\Http\Requests\Supplier;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SupplierStoreRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
// ===== Basic Info =====
|
||||
'name' => 'required|string|max:255',
|
||||
'phone' => 'required|string|max:20',
|
||||
'company_name' => 'nullable|string|max:255',
|
||||
'contact_person' => 'nullable|string|max:255',
|
||||
'alternate_phone' => 'nullable|string|max:20',
|
||||
'email' => 'nullable|email|max:255',
|
||||
'website' => 'nullable|url|max:255',
|
||||
'image' => 'nullable|image',
|
||||
|
||||
// ===== Address Info =====
|
||||
'address' => 'nullable|string|max:1000',
|
||||
'city' => 'nullable|string|max:255',
|
||||
'state' => 'nullable|string|max:255',
|
||||
'country' => 'nullable|string|max:255',
|
||||
'postal_code' => 'nullable|string|max:20',
|
||||
|
||||
// ===== Financial / Business Info =====
|
||||
'tax_number' => 'nullable|string|max:100',
|
||||
'bank_name' => 'nullable|string|max:255',
|
||||
'bank_account_name' => 'nullable|string|max:255',
|
||||
'bank_account_number' => 'nullable|string|max:50',
|
||||
'ifsc_code' => 'nullable|string|max:20',
|
||||
'opening_balance' => 'nullable|numeric|min:0',
|
||||
'opening_balance_date' => 'nullable|date',
|
||||
'due' => 'nullable|numeric|min:0',
|
||||
'balance' => 'nullable|numeric|min:0',
|
||||
|
||||
// ===== Relationship Info =====
|
||||
'supply_type' => 'nullable|string|max:255',
|
||||
'payment_terms' => 'nullable|string|max:50',
|
||||
'credit_limit' => 'nullable|numeric|min:0',
|
||||
|
||||
// ===== Ratings & Notes =====
|
||||
'rating' => 'nullable|numeric|between:0,5',
|
||||
'notes' => 'nullable|string|max:2000',
|
||||
|
||||
// ===== Documents =====
|
||||
'contract_file' => 'nullable|string|max:255',
|
||||
'trade_license' => 'nullable|string|max:255',
|
||||
'nid_number' => 'nullable|string|max:50',
|
||||
|
||||
// ===== Status =====
|
||||
'status' => 'nullable|in:0,1',
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Restaurant\Http\Requests\Supplier;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SupplierUpdateRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
// ===== Basic Info =====
|
||||
'name' => 'required|string|max:255',
|
||||
'phone' => 'required|string|max:20',
|
||||
'company_name' => 'nullable|string|max:255',
|
||||
'contact_person' => 'nullable|string|max:255',
|
||||
'alternate_phone' => 'nullable|string|max:20',
|
||||
'email' => 'nullable|email|max:255',
|
||||
'website' => 'nullable|url|max:255',
|
||||
'image' => 'nullable|image',
|
||||
|
||||
// ===== Address Info =====
|
||||
'address' => 'nullable|string|max:1000',
|
||||
'city' => 'nullable|string|max:255',
|
||||
'state' => 'nullable|string|max:255',
|
||||
'country' => 'nullable|string|max:255',
|
||||
'postal_code' => 'nullable|string|max:20',
|
||||
|
||||
// ===== Financial / Business Info =====
|
||||
'tax_number' => 'nullable|string|max:100',
|
||||
'bank_name' => 'nullable|string|max:255',
|
||||
'bank_account_name' => 'nullable|string|max:255',
|
||||
'bank_account_number' => 'nullable|string|max:50',
|
||||
'ifsc_code' => 'nullable|string|max:20',
|
||||
'opening_balance' => 'nullable|numeric|min:0',
|
||||
'opening_balance_date' => 'nullable|date',
|
||||
'due' => 'nullable|numeric|min:0',
|
||||
'balance' => 'nullable|numeric|min:0',
|
||||
|
||||
// ===== Relationship Info =====
|
||||
'supply_type' => 'nullable|string|max:255',
|
||||
'payment_terms' => 'nullable|string|max:50',
|
||||
'credit_limit' => 'nullable|numeric|min:0',
|
||||
|
||||
// ===== Ratings & Notes =====
|
||||
'rating' => 'nullable|numeric|between:0,5',
|
||||
'notes' => 'nullable|string|max:2000',
|
||||
|
||||
// ===== Documents =====
|
||||
'contract_file' => 'nullable|string|max:255',
|
||||
'trade_license' => 'nullable|string|max:255',
|
||||
'nid_number' => 'nullable|string|max:50',
|
||||
|
||||
// ===== Status =====
|
||||
'status' => 'nullable|in:0,1',
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user