mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
bitcoin events added
This commit is contained in:
35
database/factories/BitcoinEventFactory.php
Normal file
35
database/factories/BitcoinEventFactory.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
use App\Models\BitcoinEvent;
|
||||
use App\Models\Venue;
|
||||
|
||||
class BitcoinEventFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = BitcoinEvent::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'venue_id' => Venue::factory(),
|
||||
'from' => $this->faker->dateTime(),
|
||||
'to' => $this->faker->dateTime(),
|
||||
'title' => $this->faker->sentence(4),
|
||||
'description' => $this->faker->text,
|
||||
'link' => $this->faker->word,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBitcoinEventsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::disableForeignKeyConstraints();
|
||||
|
||||
Schema::create('bitcoin_events', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('venue_id')
|
||||
->constrained()
|
||||
->cascadeOnDelete()
|
||||
->cascadeOnUpdate();
|
||||
$table->dateTime('from');
|
||||
$table->dateTime('to');
|
||||
$table->string('title');
|
||||
$table->text('description')
|
||||
->nullable();
|
||||
$table->string('link')
|
||||
->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::enableForeignKeyConstraints();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('bitcoin_events');
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ namespace Database\Seeders;
|
||||
use App\Console\Commands\Database\CreateTags;
|
||||
use App\Console\Commands\Feed\ReadAndSyncEinundzwanzigPodcastFeed;
|
||||
use App\Console\Commands\OpenBooks\SyncOpenBooks;
|
||||
use App\Models\BitcoinEvent;
|
||||
use App\Models\Category;
|
||||
use App\Models\City;
|
||||
use App\Models\Country;
|
||||
@@ -22,6 +23,7 @@ use App\Models\Team;
|
||||
use App\Models\User;
|
||||
use App\Models\Venue;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Str;
|
||||
use Spatie\Permission\Models\Role;
|
||||
@@ -119,6 +121,11 @@ class DatabaseSeeder extends Seeder
|
||||
'name' => 'The Blue Studio Coworking (Pfronten)',
|
||||
'street' => 'Teststraße 3',
|
||||
]);
|
||||
Venue::create([
|
||||
'city_id' => 4,
|
||||
'name' => 'Innsbruck',
|
||||
'street' => 'Innsbrucker Straße 1',
|
||||
]);
|
||||
Lecturer::create([
|
||||
'team_id' => 1,
|
||||
'name' => 'Markus Turm',
|
||||
@@ -298,5 +305,22 @@ class DatabaseSeeder extends Seeder
|
||||
'description' => fake()->text(),
|
||||
'link' => 'https://t.me/EinundzwanzigKempten',
|
||||
]);
|
||||
BitcoinEvent::create([
|
||||
'venue_id' => 4,
|
||||
'from' => Carbon::parse('2023-09-12')
|
||||
->startOfDay()
|
||||
->addHours(8),
|
||||
'to' => Carbon::parse('2023-09-16')
|
||||
->startOfDay()
|
||||
->addHours(18),
|
||||
'title' => 'BTC23',
|
||||
'description' => 'The largest Bitcoin conference in German is entering the second round: The BTC23 will be even better, more diverse and quite controversial. We are open - for Bitcoiners, interested parties and skeptics from all directions. Three days with bitcoiners, thought leaders and entrepreneurs from space - full of relevant lectures, debates and conversations. And of course parties! The following applies: The BTC23 is there for everyone, no matter what level of knowledge you have on the subject. #bitcoinonly
|
||||
|
||||
Advance ticket sales begin on December 21, 2022 at 9:21 p.m. with time-limited early bird tickets.
|
||||
|
||||
Ticket presale begins on December 21, 2022 at 9:21 p.m. Be quick - there are a limited amount of early bird tickets again.
|
||||
',
|
||||
'link' => 'https://bconf.de/en/',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user