40 lines
1.2 KiB
PHP
40 lines
1.2 KiB
PHP
<?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',
|
|
];
|
|
}
|
|
}
|