atcheck/database/seeds/RoomsTableSeeder.php
2019-12-09 12:17:23 +01:00

89 lines
5.7 KiB
PHP

<?php
use Illuminate\Database\Seeder;
class RoomsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$rooms = [
array('name' => 'A0-1', 'capacity' => 30, 'arrangement' =>
'c[1,1]c[2,2]c[3,3]c[4,4]c[5,5]c[6,6]++_++c[7,7]c[8,8]c[9,9]c[10,10]c[11,11]c[12,12]++c[13,13]c[14,14]c[15,15]c[16,16]c[17,17]c[18,18]'
),
array('name' => 'A0-11', 'capacity' => 24, 'arrangement' =>
'__c[3,3]c[4,4]c[5,5]c[6,6]++c[7,7]c[8,8]_c[10,10]c[11,11]c[12,12]++c[13,13]c[14,14]c[15,15]c[16,16]c[17,17]c[18,18]'
),
array('name' => 'A0-12', 'capacity' => 24, 'arrangement' => ''),
array('name' => 'A0-3', 'capacity' => 13, 'arrangement' => ''),
array('name' => 'A0-5', 'capacity' => 13, 'arrangement' => ''),
array('name' => 'A1-14/15', 'capacity' => 25, 'arrangement' =>
'c[1,1]c[2,2]c[3,3]c[4,4]c[5,5]++_++c[6,6]c[7,7]c[8,8]c[9,9]++c[10,10]c[11,11]c[12,12]c[13,13]++_++c[14,14]c[15,15]c[16,16]c[17,17]++_++c[18,18]c[19,19]c[20,20]c[21,21]++c[22,22]c[23,23]c[24,24]c[25,25]'
),
array('name' => 'A1-16/17', 'capacity' => 25, 'arrangement' =>
'c[1,1]c[2,2]c[3,3]c[4,4]c[5,5]++_++c[6,6]c[7,7]c[8,8]c[9,9]++c[10,10]c[11,11]c[12,12]c[13,13]++_++c[14,14]c[15,15]c[16,16]c[17,17]++_++c[18,18]c[19,19]c[20,20]c[21,21]++c[22,22]c[23,23]c[24,24]c[25,25]'
),
array('name' => 'A1-18', 'capacity' => 13, 'arrangement' => ''),
array('name' => 'A1-20', 'capacity' => 13, 'arrangement' => ''),
array('name' => 'A1-22/23', 'capacity' => 25, 'arrangement' =>
'c[1,1]c[2,2]c[3,3]c[4,4]c[5,5]++_++c[6,6]c[7,7]c[8,8]c[9,9]++c[10,10]c[11,11]c[12,12]c[13,13]++_++c[14,14]c[15,15]c[16,16]c[17,17]++_++c[18,18]c[19,19]c[20,20]c[21,21]++c[22,22]c[23,23]c[24,24]c[25,25]'
),
array('name' => 'A1-24/25', 'capacity' => 25, 'arrangement' =>
'c[1,1]c[2,2]c[3,3]c[4,4]c[5,5]++_++c[6,6]c[7,7]c[8,8]c[9,9]++c[10,10]c[11,11]c[12,12]c[13,13]++_++c[14,14]c[15,15]c[16,16]c[17,17]++_++c[18,18]c[19,19]c[20,20]c[21,21]++c[22,22]c[23,23]c[24,24]c[25,25]'
),
array('name' => 'A1-33 (Sala RW)', 'capacity' => 64, 'arrangement' => ''),
array('name' => 'A2-1', 'capacity' => 24, 'arrangement' => ''),
array('name' => 'A2-10', 'capacity' => 34, 'arrangement' => ''),
array('name' => 'A2-11', 'capacity' => 34, 'arrangement' => ''),
array('name' => 'A2-12', 'capacity' => 34, 'arrangement' => ''),
array('name' => 'A2-14', 'capacity' => 48, 'arrangement' => ''),
array('name' => 'A2-19', 'capacity' => 48, 'arrangement' => ''),
array('name' => 'A2-2', 'capacity' => 34, 'arrangement' => ''),
array('name' => 'A2-20', 'capacity' => 32, 'arrangement' => ''),
array('name' => 'A2-21', 'capacity' => 48, 'arrangement' => ''),
array('name' => 'A2-22', 'capacity' => 48, 'arrangement' => ''),
array('name' => 'A2-23', 'capacity' => 48, 'arrangement' => ''),
array('name' => 'A2-24', 'capacity' => 48, 'arrangement' => ''),
array('name' => 'A2-3', 'capacity' => 24, 'arrangement' => ''),
array('name' => 'A2-4', 'capacity' => 24, 'arrangement' => ''),
array('name' => 'A2-5', 'capacity' => 24, 'arrangement' => ''),
array('name' => 'A2-8', 'capacity' => 24, 'arrangement' => ''),
array('name' => 'A2-9', 'capacity' => 34, 'arrangement' => ''),
array('name' => 'Aula A', 'capacity' => 196, 'arrangement' => ''),
array('name' => 'Aula B', 'capacity' => 117, 'arrangement' => ''),
array('name' => 'Aula C', 'capacity' => 117, 'arrangement' => ''),
array('name' => 'B1-06', 'capacity' => 4, 'arrangement' => ''),
array('name' => 'B1-07/08', 'capacity' => 16, 'arrangement' => ''),
array('name' => 'B1-37', 'capacity' => 18, 'arrangement' => ''),
array('name' => 'B1-38', 'capacity' => 12, 'arrangement' => ''),
array('name' => 'B2-08/09', 'capacity' => 16, 'arrangement' => ''),
array('name' => 'B2-38', 'capacity' => 15, 'arrangement' => ''),
array('name' => 'B2-39', 'capacity' => 12, 'arrangement' => ''),
array('name' => 'B2-44', 'capacity' => 4, 'arrangement' => ''),
array('name' => 'B3-08/09', 'capacity' => 16, 'arrangement' => ''),
array('name' => 'B3-38', 'capacity' => 18, 'arrangement' => ''),
array('name' => 'B3-39', 'capacity' => 18, 'arrangement' => ''),
array('name' => 'B3-49', 'capacity' => 12, 'arrangement' => ''),
array('name' => 'C2-3', 'capacity' => 1, 'arrangement' => ''),
array('name' => 'D-1', 'capacity' => 22, 'arrangement' => ''),
array('name' => 'D-2', 'capacity' => 21, 'arrangement' => ''),
array('name' => 'D-3', 'capacity' => 22, 'arrangement' => ''),
array('name' => 'Klub Profesorski', 'capacity' => null, 'arrangement' => ''),
array('name' => 'Inna sala', 'capacity' => null, 'arrangement' =>
'c[1,1]c[2,2]c[3,3]c[4,4]c[5,5]++_++c[6,6]c[7,7]c[8,8]c[9,9]++c[10,10]c[11,11]c[12,12]c[13,13]++_++c[14,14]c[15,15]c[16,16]c[17,17]++_++c[18,18]c[19,19]c[20,20]c[21,21]++c[22,22]c[23,23]c[24,24]c[25,25]'
)
];
foreach ($rooms as $room) {
DB::table('rooms')->insert([
'name' => $room['name'],
'capacity' => $room['capacity'],
'arrangement' => $room['arrangement']
]);
}
}
}