diff --git a/motorradig/app/Gallery.php b/motorradig/app/Gallery.php new file mode 100644 index 0000000..d38db2f --- /dev/null +++ b/motorradig/app/Gallery.php @@ -0,0 +1,10 @@ +define(Gallery::class, function (Faker $faker) { + return [ + // + ]; +}); diff --git a/motorradig/database/factories/GalleryItemFactory.php b/motorradig/database/factories/GalleryItemFactory.php new file mode 100644 index 0000000..7f19a6a --- /dev/null +++ b/motorradig/database/factories/GalleryItemFactory.php @@ -0,0 +1,12 @@ +define(GalleryItem::class, function (Faker $faker) { + return [ + // + ]; +}); diff --git a/motorradig/database/migrations/2020_09_30_082629_create_tours_table.php b/motorradig/database/migrations/2020_09_30_082629_create_tours_table.php index e156a4c..b95cdba 100644 --- a/motorradig/database/migrations/2020_09_30_082629_create_tours_table.php +++ b/motorradig/database/migrations/2020_09_30_082629_create_tours_table.php @@ -24,6 +24,8 @@ class CreateToursTable extends Migration $table->boolean('is_cancelled')->default(false); $table->text('bericht')->nullable(); $table->string('status')->default('FINDET STATT'); + $table->integer('presentation_gallery_id')->default(-1); + $table->integer('tour_gallery_id')->default(-1); $table->timestamps(); }); } diff --git a/motorradig/database/migrations/2020_10_15_065425_create_galleries_table.php b/motorradig/database/migrations/2020_10_15_065425_create_galleries_table.php new file mode 100644 index 0000000..2c85cc9 --- /dev/null +++ b/motorradig/database/migrations/2020_10_15_065425_create_galleries_table.php @@ -0,0 +1,32 @@ +id(); + $table->string('name'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('galleries'); + } +} diff --git a/motorradig/database/migrations/2020_10_15_065431_create_gallery_items_table.php b/motorradig/database/migrations/2020_10_15_065431_create_gallery_items_table.php new file mode 100644 index 0000000..4d4416e --- /dev/null +++ b/motorradig/database/migrations/2020_10_15_065431_create_gallery_items_table.php @@ -0,0 +1,34 @@ +id(); + $table->integer('gallery_id'); + $table->integer('order')->default(0); + $table->string('filename'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('gallery_items'); + } +} diff --git a/motorradig/database/seeds/GalleryItemSeeder.php b/motorradig/database/seeds/GalleryItemSeeder.php new file mode 100644 index 0000000..30a1785 --- /dev/null +++ b/motorradig/database/seeds/GalleryItemSeeder.php @@ -0,0 +1,16 @@ + - + @if($tour->)