diff --git a/app/Models/ProcessHistories.php b/app/Models/ProcessHistories.php new file mode 100644 index 0000000..9f3996f --- /dev/null +++ b/app/Models/ProcessHistories.php @@ -0,0 +1,22 @@ + 'array', + 'stages_timing' => 'array', + 'started_at' => 'datetime', + 'finished_at' => 'datetime' + ]; +} diff --git a/database/migrations/2024_12_09_100952_create_process_histories_table.php b/database/migrations/2024_12_09_100952_create_process_histories_table.php new file mode 100644 index 0000000..35afe55 --- /dev/null +++ b/database/migrations/2024_12_09_100952_create_process_histories_table.php @@ -0,0 +1,37 @@ +id(); + $table->json('images'); // [{ "path": "...", "original_name": "..." }, ...] + $table->string('step_file_name')->nullable(); + $table->timestamp('started_at')->nullable(); + $table->timestamp('finished_at')->nullable(); + $table->unsignedInteger('processed_count')->default(0); + $table->json('stages_timing')->nullable(); // {"upload_time":..., "queue_wait_time":..., "processing_time":..., ...} + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('process_histories'); + } +}