-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.stub
executable file
·48 lines (43 loc) · 1.24 KB
/
model.stub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
namespace {{ namespace }};
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* @OA\Schema(
* description="{{ class }} model",
* title="{{ class }}",
* required={},
* @OA\Property(type="integer",description="id of {{ class }}",title="id",property="id",example="1",readOnly="true"),
* @OA\Property(type="dateTime",title="created_at",property="created_at",example="2022-07-04T02:41:42.336Z",readOnly="true"),
* @OA\Property(type="dateTime",title="updated_at",property="updated_at",example="2022-07-04T02:41:42.336Z",readOnly="true"),
* )
*
* @OA\Schema(
* schema="{{ class }}s",
* title="{{ class }}s",
* @OA\Property(title="data",property="data",type="array",
* @OA\Items(type="object",ref="#/components/schemas/{{ class }}"),
* )
* )
*
* @OA\Parameter(
* parameter="{{ class }}--id",
* in="path",
* name="{{ class }}_id",
* required=true,
* description="Id of {{ class }}",
* @OA\Schema(
* type="integer",
* example="1",
* )
* ),
*/
class {{ class }} extends Model
{
use HasFactory;
protected $fillable = [
'created_at',
'updated_at',
];
protected $casts = [];
}