You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create API tests for HTTP 200, 302, 401, 405, 422, 500 - example
FRONTEND
new page Task.vue in atomic/pages/Entity folder - same as others entities
useTaskFields in new file atomic/bosons/constants/support/Fields/Entities/task.ts - same as others entities
taskRequests function in new folder atomic/bosons/utils/support/Api/Task in requests.ts file
types in atomic/bosons/types/support/Api/Task, atomic/bosons/types/support/Entities/Task, atomic/bosons/types/support/Fields/Entities/Task - same as others entities
tests for api methods in vitests/utils/support/Api/Task same as other entities
The text was updated successfully, but these errors were encountered:
Fields:
id
: number (given by default)user_id
: numberassignee_id
: numbercollaborator_ids
: number[]title
: stringdescription
: stringstart_date
: stringend_date
: stringKeep fields order in all files and methods like migrations, models fields, instance methods etc.
Migration
php artisan make:migration create_tasks_table
public function user(): BelongsTo
inTask.php
model andpublic function task(): HasMany
inUser.php
model - example on bottom of the filephp artisan migrate:fresh
and check if the migrations ran successfulTaskMigrationsTest.php
intests/Database/Migrations
folder and write tests like other entities - example./vendor/bin/pest --group=migrations
Model
php artisan make:model Task
protected $fillable
with all fields, except id because Laravel handles it automaticallygetId
etc. with full typings as other entities in the project - examplescopeGetById
etc.in
tests/Database/Models``` folder and write tests for instance and scope methods like other entities - example./vendor/bin/pest --group=models
Factory
php artisan make:factory TaskFactory
TaskFactoryTest.php
intests/Database/Factories
folder and write tests for instance and scope methods like other entities - example./vendor/bin/pest --group=factories
Seeder
php artisan make:seeder TaskSeeder
and call factories - exampleTaskSeeder
inDatabaseSeeder.php
php artisan migrate:fresh --seed
and check if TaskSeeder ran successfulContract
TaskContract.php
inapp/Contracts
Transformer
TaskTransformer.php
inapp/Transformers
Controller
TaskController.php
inapp/Http/Controllers/Entities
TaskControllerTest.php
intests/Feature/Controllers
folder and write tests for all methods like other entities - exampleService
TaskService.php
inapp/Services
Routes
routes/api.php
Tests
FRONTEND
Task.vue
inatomic/pages/Entity
folder - same as others entitiesuseTaskFields
in new fileatomic/bosons/constants/support/Fields/Entities/task.ts
- same as others entitiestaskRequests
function in new folderatomic/bosons/utils/support/Api/Task
inrequests.ts
fileatomic/bosons/types/support/Api/Task
,atomic/bosons/types/support/Entities/Task
,atomic/bosons/types/support/Fields/Entities/Task
- same as others entitiesvitests/utils/support/Api/Task
same as other entitiesThe text was updated successfully, but these errors were encountered: