Files
backend_vib360_laravel/app/Http/Requests/CreateAssetRequest.php

40 lines
1.2 KiB
PHP
Raw Normal View History

2025-03-20 11:52:34 +05:30
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CreateAssetRequest 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, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'id' => 'required|uuid',
'entity_type' => 'required|string|in:ASSET',
'created_time' => 'required|integer',
'tenant_id' => 'required|uuid',
'customer_xid' => 'required|uuid',
'name' => 'required|string|max:255',
'type' => 'required|string|max:255',
'label' => 'nullable|string|max:255',
'asset_profile_id' => 'required|uuid',
'external_id' => 'nullable|uuid',
'version' => 'nullable|integer|min:1',
'additional_info' => 'nullable|json',
];
}
}