chore: [env] .env.example 업데이트 및 .gitignore 정리

- .env.example을 SAM 프로젝트 실제 키 구조로 업데이트
- .gitignore에 !.env.example 예외 추가
- GCS_* 중복 키 제거, Gemini/Claude/Vertex 키 섹션 추가
This commit is contained in:
김보곤
2026-02-23 10:17:37 +09:00
parent 3ae3a1dcda
commit 240199af9d
51 changed files with 623 additions and 2726 deletions

View File

@@ -1,23 +0,0 @@
<?php
namespace App\Http\Requests\Authz;
use Illuminate\Foundation\Http\FormRequest;
class RoleIndexRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'page' => 'sometimes|integer|min:1',
'size' => 'sometimes|integer|min:1|max:100',
'q' => 'sometimes|nullable|string|max:100',
'is_hidden' => 'sometimes|boolean',
];
}
}

View File

@@ -1,38 +0,0 @@
<?php
namespace App\Http\Requests\Authz;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class RolePermissionGrantRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'permission_names' => 'sometimes|array',
'permission_names.*' => 'string|min:1',
'menus' => 'sometimes|array',
'menus.*' => 'integer|min:1',
'actions' => 'sometimes|array',
'actions.*' => [
'string', Rule::in(config('authz.menu_actions', ['view', 'create', 'update', 'delete', 'approve'])),
],
];
}
public function withValidator($validator): void
{
$validator->after(function ($validator) {
$data = $this->all();
if (empty($data['permission_names']) && (empty($data['menus']) || empty($data['actions']))) {
$validator->errors()->add('permission_names', __('error.role.permission_input_required'));
}
});
}
}

View File

@@ -1,24 +0,0 @@
<?php
namespace App\Http\Requests\Authz;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class RolePermissionToggleRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
$permissionTypes = config('authz.menu_actions', ['view', 'create', 'update', 'delete', 'approve', 'export', 'manage']);
return [
'menu_id' => 'required|integer|min:1',
'permission_type' => ['required', 'string', Rule::in($permissionTypes)],
];
}
}

View File

@@ -1,31 +0,0 @@
<?php
namespace App\Http\Requests\Authz;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class RoleStoreRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
$tenantId = (int) app('tenant_id');
$guard = 'api';
return [
'name' => [
'required', 'string', 'max:100',
Rule::unique('roles', 'name')->where(fn ($q) => $q
->where('tenant_id', $tenantId)
->where('guard_name', $guard)),
],
'description' => 'nullable|string|max:255',
'is_hidden' => 'sometimes|boolean',
];
}
}

View File

@@ -1,32 +0,0 @@
<?php
namespace App\Http\Requests\Authz;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class RoleUpdateRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
$tenantId = (int) app('tenant_id');
$guard = 'api';
$roleId = (int) $this->route('id');
return [
'name' => [
'sometimes', 'string', 'max:100',
Rule::unique('roles', 'name')
->where(fn ($q) => $q->where('tenant_id', $tenantId)->where('guard_name', $guard))
->ignore($roleId),
],
'description' => 'sometimes|nullable|string|max:255',
'is_hidden' => 'sometimes|boolean',
];
}
}

View File

@@ -1,33 +0,0 @@
<?php
namespace App\Http\Requests\Authz;
use Illuminate\Foundation\Http\FormRequest;
class UserRoleGrantRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'role_names' => 'sometimes|array',
'role_names.*' => 'string|min:1',
'role_ids' => 'sometimes|array',
'role_ids.*' => 'integer|min:1',
];
}
public function withValidator($validator): void
{
$validator->after(function ($validator) {
$data = $this->all();
if (empty($data['role_names']) && empty($data['role_ids'])) {
$validator->errors()->add('role_names', __('error.role.role_input_required'));
}
});
}
}

View File

@@ -1,21 +0,0 @@
<?php
namespace App\Http\Requests\Barobill;
use Illuminate\Foundation\Http\FormRequest;
class BankServiceUrlRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'bank_code' => ['required', 'string', 'max:10'],
'account_type' => ['required', 'string', 'max:10'],
];
}
}

View File

@@ -1,21 +0,0 @@
<?php
namespace App\Http\Requests\Barobill;
use Illuminate\Foundation\Http\FormRequest;
class BarobillLoginRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'barobill_id' => ['required', 'string', 'max:50'],
'password' => ['required', 'string', 'max:255'],
];
}
}

View File

@@ -1,30 +0,0 @@
<?php
namespace App\Http\Requests\Barobill;
use Illuminate\Foundation\Http\FormRequest;
class BarobillSignupRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'business_number' => ['required', 'string', 'max:20'],
'company_name' => ['required', 'string', 'max:100'],
'ceo_name' => ['required', 'string', 'max:50'],
'business_type' => ['nullable', 'string', 'max:50'],
'business_category' => ['nullable', 'string', 'max:50'],
'address' => ['nullable', 'string', 'max:255'],
'barobill_id' => ['required', 'string', 'max:50'],
'password' => ['required', 'string', 'max:255'],
'manager_name' => ['nullable', 'string', 'max:50'],
'manager_phone' => ['nullable', 'string', 'max:20'],
'manager_email' => ['nullable', 'email', 'max:100'],
];
}
}

View File

@@ -1,28 +0,0 @@
<?php
namespace App\Http\Requests\TaxInvoice;
use Illuminate\Foundation\Http\FormRequest;
class SaveSupplierSettingsRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'business_number' => ['required', 'string', 'max:20'],
'company_name' => ['required', 'string', 'max:100'],
'representative_name' => ['required', 'string', 'max:50'],
'address' => ['nullable', 'string', 'max:255'],
'business_type' => ['nullable', 'string', 'max:100'],
'business_item' => ['nullable', 'string', 'max:100'],
'contact_name' => ['nullable', 'string', 'max:50'],
'contact_phone' => ['nullable', 'string', 'max:20'],
'contact_email' => ['nullable', 'email', 'max:100'],
];
}
}

View File

@@ -19,16 +19,9 @@ public function rules(): array
'account_number' => ['required', 'string', 'max:30', 'regex:/^[\d-]+$/'],
'account_holder' => ['required', 'string', 'max:50'],
'account_name' => ['required', 'string', 'max:100'],
'account_type' => ['nullable', 'string', 'max:30'],
'balance' => ['nullable', 'numeric', 'min:0'],
'currency' => ['nullable', 'string', 'max:3'],
'opened_at' => ['nullable', 'date'],
'branch_name' => ['nullable', 'string', 'max:100'],
'memo' => ['nullable', 'string', 'max:500'],
'status' => ['nullable', 'string', 'in:active,inactive'],
'assigned_user_id' => ['nullable', 'integer', 'exists:users,id'],
'is_primary' => ['nullable', 'boolean'],
'sort_order' => ['nullable', 'integer', 'min:0'],
];
}

View File

@@ -19,15 +19,8 @@ public function rules(): array
'account_number' => ['sometimes', 'string', 'max:30', 'regex:/^[\d-]+$/'],
'account_holder' => ['sometimes', 'string', 'max:50'],
'account_name' => ['sometimes', 'string', 'max:100'],
'account_type' => ['sometimes', 'nullable', 'string', 'max:30'],
'balance' => ['sometimes', 'nullable', 'numeric', 'min:0'],
'currency' => ['sometimes', 'nullable', 'string', 'max:3'],
'opened_at' => ['sometimes', 'nullable', 'date'],
'branch_name' => ['sometimes', 'nullable', 'string', 'max:100'],
'memo' => ['sometimes', 'nullable', 'string', 'max:500'],
'status' => ['sometimes', 'string', 'in:active,inactive'],
'assigned_user_id' => ['nullable', 'integer', 'exists:users,id'],
'sort_order' => ['sometimes', 'nullable', 'integer', 'min:0'],
];
}

View File

@@ -15,21 +15,12 @@ public function rules(): array
{
return [
'card_company' => ['required', 'string', 'max:50'],
'card_type' => ['nullable', 'string', 'max:50'],
'card_number' => ['required', 'string', 'regex:/^\d{13,19}$/'],
'expiry_date' => ['required', 'string', 'regex:/^(0[1-9]|1[0-2])\/\d{2}$/'],
'card_password' => ['nullable', 'string', 'size:2', 'regex:/^\d{2}$/'],
'card_name' => ['required', 'string', 'max:100'],
'alias' => ['nullable', 'string', 'max:100'],
'csv' => ['nullable', 'string', 'max:4'],
'payment_day' => ['nullable', 'integer', 'min:1', 'max:31'],
'total_limit' => ['nullable', 'numeric', 'min:0'],
'used_amount' => ['nullable', 'numeric', 'min:0'],
'remaining_limit' => ['nullable', 'numeric', 'min:0'],
'status' => ['nullable', 'string', 'in:active,inactive'],
'is_manual' => ['nullable', 'boolean'],
'assigned_user_id' => ['nullable', 'integer', 'exists:users,id'],
'memo' => ['nullable', 'string', 'max:500'],
];
}

View File

@@ -15,21 +15,12 @@ public function rules(): array
{
return [
'card_company' => ['sometimes', 'string', 'max:50'],
'card_type' => ['nullable', 'string', 'max:50'],
'card_number' => ['sometimes', 'string', 'regex:/^\d{13,19}$/'],
'expiry_date' => ['sometimes', 'string', 'regex:/^(0[1-9]|1[0-2])\/\d{2}$/'],
'card_password' => ['nullable', 'string', 'size:2', 'regex:/^\d{2}$/'],
'card_name' => ['sometimes', 'string', 'max:100'],
'alias' => ['nullable', 'string', 'max:100'],
'csv' => ['nullable', 'string', 'max:4'],
'payment_day' => ['nullable', 'integer', 'min:1', 'max:31'],
'total_limit' => ['nullable', 'numeric', 'min:0'],
'used_amount' => ['nullable', 'numeric', 'min:0'],
'remaining_limit' => ['nullable', 'numeric', 'min:0'],
'status' => ['sometimes', 'string', 'in:active,inactive'],
'is_manual' => ['nullable', 'boolean'],
'assigned_user_id' => ['nullable', 'integer', 'exists:users,id'],
'memo' => ['nullable', 'string', 'max:500'],
];
}

View File

@@ -1,31 +0,0 @@
<?php
namespace App\Http\Requests\V1\CorporateCard;
use Illuminate\Foundation\Http\FormRequest;
class StoreCorporateCardRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'card_name' => ['required', 'string', 'max:100'],
'card_company' => ['required', 'string', 'max:50'],
'card_number' => ['required', 'string', 'max:30'],
'card_type' => ['required', 'string', 'in:credit,debit'],
'payment_day' => ['nullable', 'integer', 'min:1', 'max:31'],
'credit_limit' => ['nullable', 'numeric', 'min:0'],
'card_holder_name' => ['required', 'string', 'max:100'],
'actual_user' => ['required', 'string', 'max:100'],
'expiry_date' => ['nullable', 'string', 'max:10'],
'cvc' => ['nullable', 'string', 'max:4'],
'status' => ['nullable', 'string', 'in:active,inactive'],
'memo' => ['nullable', 'string', 'max:500'],
];
}
}

View File

@@ -1,31 +0,0 @@
<?php
namespace App\Http\Requests\V1\CorporateCard;
use Illuminate\Foundation\Http\FormRequest;
class UpdateCorporateCardRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'card_name' => ['sometimes', 'string', 'max:100'],
'card_company' => ['sometimes', 'string', 'max:50'],
'card_number' => ['sometimes', 'string', 'max:30'],
'card_type' => ['sometimes', 'string', 'in:credit,debit'],
'payment_day' => ['sometimes', 'nullable', 'integer', 'min:1', 'max:31'],
'credit_limit' => ['sometimes', 'nullable', 'numeric', 'min:0'],
'card_holder_name' => ['sometimes', 'string', 'max:100'],
'actual_user' => ['sometimes', 'string', 'max:100'],
'expiry_date' => ['sometimes', 'nullable', 'string', 'max:10'],
'cvc' => ['sometimes', 'nullable', 'string', 'max:4'],
'status' => ['sometimes', 'string', 'in:active,inactive'],
'memo' => ['sometimes', 'nullable', 'string', 'max:500'],
];
}
}