diff --git a/backend-laravel/app/Models/Canton.php b/backend-laravel/app/Models/Canton.php new file mode 100644 index 0000000..414e70e --- /dev/null +++ b/backend-laravel/app/Models/Canton.php @@ -0,0 +1,11 @@ +id(); + $table->string("name"); + $table->string("img"); + $table->string("ecusson"); + $table->integer("population")->unsigned(); + $table->string("coord"); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('villes'); + } +}; diff --git a/backend-laravel/database/migrations/2023_10_28_230751_create_cantons_table.php b/backend-laravel/database/migrations/2023_10_28_230751_create_cantons_table.php new file mode 100644 index 0000000..b1d7c57 --- /dev/null +++ b/backend-laravel/database/migrations/2023_10_28_230751_create_cantons_table.php @@ -0,0 +1,29 @@ +id(); + $table->string("name"); + $table->string("img"); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('cantons'); + } +}; diff --git a/backend-laravel/database/migrations/2023_10_28_230926_create_langues_table.php b/backend-laravel/database/migrations/2023_10_28_230926_create_langues_table.php new file mode 100644 index 0000000..40fa7e7 --- /dev/null +++ b/backend-laravel/database/migrations/2023_10_28_230926_create_langues_table.php @@ -0,0 +1,28 @@ +id(); + $table->string("name"); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('langues'); + } +}; diff --git a/backend-laravel/database/migrations/2023_10_28_231103_create_cycles_table.php b/backend-laravel/database/migrations/2023_10_28_231103_create_cycles_table.php new file mode 100644 index 0000000..de946c5 --- /dev/null +++ b/backend-laravel/database/migrations/2023_10_28_231103_create_cycles_table.php @@ -0,0 +1,30 @@ +id(); + $table->text("shuffledList"); + $table->integer("index")->unsigned(); + $table->integer("count")->unsigned(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('cycles'); + } +}; diff --git a/backend-laravel/database/migrations/2023_10_28_233754_create_langues_villes_table.php b/backend-laravel/database/migrations/2023_10_28_233754_create_langues_villes_table.php new file mode 100644 index 0000000..0b4df7e --- /dev/null +++ b/backend-laravel/database/migrations/2023_10_28_233754_create_langues_villes_table.php @@ -0,0 +1,32 @@ +unsignedBigInteger('author_id'); + $table->unsignedBigInteger('book_id'); + + $table->primary(['author_id', 'book_id']); + + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('langues_villes'); + } +};