diff --git a/app/Http/Controllers/TaskController.php b/app/Http/Controllers/TaskController.php new file mode 100644 index 0000000..c7411fb --- /dev/null +++ b/app/Http/Controllers/TaskController.php @@ -0,0 +1,66 @@ +|string> + */ + public function rules(): array + { + return [ + // + ]; + } +} diff --git a/app/Http/Requests/UpdateTaskRequest.php b/app/Http/Requests/UpdateTaskRequest.php new file mode 100644 index 0000000..1657a01 --- /dev/null +++ b/app/Http/Requests/UpdateTaskRequest.php @@ -0,0 +1,28 @@ +|string> + */ + public function rules(): array + { + return [ + // + ]; + } +} diff --git a/app/Models/Task.php b/app/Models/Task.php new file mode 100644 index 0000000..5458207 --- /dev/null +++ b/app/Models/Task.php @@ -0,0 +1,11 @@ + + */ +class TaskFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + // + ]; + } +} diff --git a/database/migrations/2024_04_27_115331_create_tasks_table.php b/database/migrations/2024_04_27_115331_create_tasks_table.php new file mode 100644 index 0000000..365cef9 --- /dev/null +++ b/database/migrations/2024_04_27_115331_create_tasks_table.php @@ -0,0 +1,33 @@ +id(); + $table->string('name'); + $table->text('description')->nullable(); + $table->foreignId('status_id')->constrained('task_statuses'); + $table->foreignId('created_by_id')->constrained('users'); + $table->bigInteger('assigned_to_id')->nullable(); + $table->foreign('assigned_to_id')->references('id')->on('users'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('tasks'); + } +};