diff --git a/app/Document.php b/app/Document.php
new file mode 100644
index 0000000..809cbaa
--- /dev/null
+++ b/app/Document.php
@@ -0,0 +1,14 @@
+belongsTo('\App\Team');
+ }
}
diff --git a/app/TransitCenter.php b/app/TransitCenter.php
new file mode 100644
index 0000000..6ba9f40
--- /dev/null
+++ b/app/TransitCenter.php
@@ -0,0 +1,12 @@
+increments('id');
+ $table->timestamps();
+
+ $table->integer('player_id');
+ $table->integer('team_id');
+
+ $table->text('text');
+ $table->json('photo');
+
+ $table->datetime('claimed_at')->nullable();
+ $table->boolean('processed')->default(0);
+
+ $table->integer('mission')->default(0);
+
+ // Mission 1
+ $table->integer('m1_transit_line_id')->nullable();
+ $table->string('m1_non_trimet', 255)->nullable();
+
+ // Mission 2
+ $table->integer('m2_transit_center_id')->nullable();
+ $table->boolean('m2_with_other_team')->default(0);
+
+ // Mission 3
+ $table->boolean('m3_complete')->nullable();
+
+ // Mission 4
+ $table->boolean('m4_complete')->nullable();
+
+ // Mission 5
+ $table->boolean('m5_complete')->nullable();
+ $table->boolean('m5_tip')->nullable();
+
+ // Mission 6
+ $table->boolean('m6_complete')->nullable();
+
+ // Mission 7
+ $table->integer('m7_document_id')->nullable();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('tweets');
+ }
+}
diff --git a/database/migrations/2017_07_02_184733_create_mission_7_documents.php b/database/migrations/2017_07_02_184733_create_mission_7_documents.php
new file mode 100644
index 0000000..48533e6
--- /dev/null
+++ b/database/migrations/2017_07_02_184733_create_mission_7_documents.php
@@ -0,0 +1,32 @@
+increments('id');
+ $table->string('name', 255);
+ $table->text('description');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('m7_documents');
+ }
+}
diff --git a/database/migrations/2017_07_02_184812_create_mission_1_transit_lines.php b/database/migrations/2017_07_02_184812_create_mission_1_transit_lines.php
new file mode 100644
index 0000000..2cc62a7
--- /dev/null
+++ b/database/migrations/2017_07_02_184812_create_mission_1_transit_lines.php
@@ -0,0 +1,31 @@
+increments('id');
+ $table->string('name', 255);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('transit_lines');
+ }
+}
diff --git a/database/migrations/2017_07_02_184822_create_mission_2_transit_centers.php b/database/migrations/2017_07_02_184822_create_mission_2_transit_centers.php
new file mode 100644
index 0000000..547b364
--- /dev/null
+++ b/database/migrations/2017_07_02_184822_create_mission_2_transit_centers.php
@@ -0,0 +1,31 @@
+increments('id');
+ $table->string('name', 255);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('transit_centers');
+ }
+}
diff --git a/database/migrations/2017_07_02_191218_transit_line_sort_order.php b/database/migrations/2017_07_02_191218_transit_line_sort_order.php
new file mode 100644
index 0000000..761637e
--- /dev/null
+++ b/database/migrations/2017_07_02_191218_transit_line_sort_order.php
@@ -0,0 +1,32 @@
+integer('sort')->default(0);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('transit_lines', function (Blueprint $table) {
+ $table->dropColumn('sort');
+ });
+ }
+}
diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php
index e119db6..248cc0a 100644
--- a/database/seeds/DatabaseSeeder.php
+++ b/database/seeds/DatabaseSeeder.php
@@ -11,6 +11,8 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
- // $this->call(UsersTableSeeder::class);
+ $this->call(DocumentSeeder::class);
+ $this->call(TransitCenterSeeder::class);
+ $this->call(TransitLineSeeder::class);
}
}
diff --git a/database/seeds/DocumentSeeder.php b/database/seeds/DocumentSeeder.php
new file mode 100644
index 0000000..8209da6
--- /dev/null
+++ b/database/seeds/DocumentSeeder.php
@@ -0,0 +1,28 @@
+insert(['name' => $d[0], 'description' => $d[1]]);
+ }
+}
diff --git a/database/seeds/TransitCenterSeeder.php b/database/seeds/TransitCenterSeeder.php
new file mode 100644
index 0000000..15a5451
--- /dev/null
+++ b/database/seeds/TransitCenterSeeder.php
@@ -0,0 +1,36 @@
+insert(['name' => $name]);
+ }
+}
diff --git a/database/seeds/TransitLineSeeder.php b/database/seeds/TransitLineSeeder.php
new file mode 100644
index 0000000..543f470
--- /dev/null
+++ b/database/seeds/TransitLineSeeder.php
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+';
+
+ if(preg_match_all('/"(\d+)">(.+)', $html, $matches)) {
+ foreach($matches[2] as $i=>$line) {
+ $id = $matches[1][$i];
+ DB::table('transit_lines')->insert(['id' => $id, 'name' => $line, 'sort' => $i]);
+ }
+ }
+ }
+}