@@ -12,56 +12,299 @@ class AddActionTypes extends Seeder {
* @return void
*/
public function run () {
if ( ActionTypes :: count () == 0 ) {
if ( ActionTypes :: where ( 'type_id' , 1 ) -> count() == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Заказ открыт' , 'type_id' => 1 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 2 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Добавлена позиция' , 'type_id' => 2 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 5 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Удалена позиция' , 'type_id' => 5 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 6 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Заказ закрыт' , 'type_id' => 6 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 7 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Заказ отложен' , 'type_id' => 7 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 8 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Заказ удален' , 'type_id' => 8 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 11 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Клиент добавлен' , 'type_id' => 11 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 12 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Клиент отменен' , 'type_id' => 12 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 15 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Добавлен модификатор' , 'type_id' => 15 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 16 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Удален модификатор' , 'type_id' => 16 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 17 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Начат возврат заказа' , 'type_id' => 17 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 18 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Отмена возврата заказа' , 'type_id' => 18 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 19 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Заказ возвращен' , 'type_id' => 19 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 20 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Возврат заказа окончен' , 'type_id' => 20 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 21 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Печать завершена' , 'type_id' => 21 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 22 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Отмена позиции' , 'type_id' => 22 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 23 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Ошибка печати' , 'type_id' => 23 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 24 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Наличными' , 'type_id' => 24 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 25 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Безналичными' , 'type_id' => 25 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 26 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Кредитной картой' , 'type_id' => 26 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 27 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Питание штата' , 'type_id' => 27 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 28 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Аванс' , 'type_id' => 28 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 29 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Остаток' , 'type_id' => 29 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 30 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Удалены все позиции' , 'type_id' => 30 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 31 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Начато объединение' , 'type_id' => 31 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 32 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Объединение окончено' , 'type_id' => 32 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 33 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Начато разбиение' , 'type_id' => 33 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 34 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Разбиение окончено' , 'type_id' => 34 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 35 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Конечный заказ разбиения' , 'type_id' => 35 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 36 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Заказ открыт администратором' , 'type_id' => 36 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 37 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Заказ заблокирован' , 'type_id' => 37 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 38 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Заказ разблокирован' , 'type_id' => 38 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 39 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Перевод' , 'type_id' => 39 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 40 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Custom' , 'type_id' => 40 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 41 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Заказ перенесен' , 'type_id' => 41 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 42 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Здравница' , 'type_id' => 42 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 43 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Аннулирование заказа' , 'type_id' => 43 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 44 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Открыть с перезагрузки' , 'type_id' => 44 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 45 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Место заказа' , 'type_id' => 45 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 46 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Количество клиентов' , 'type_id' => 46 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 47 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Изменить курс' , 'type_id' => 47 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 48 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Бонус' , 'type_id' => 48 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 49 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Внесение денежных средств' , 'type_id' => 49 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 50 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Выплата денежных средств' , 'type_id' => 50 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 51 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Электронными деньгами' , 'type_id' => 51 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 52 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Заказ вызван' , 'type_id' => 52 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 53 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Выход из заказа' , 'type_id' => 53 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 54 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Автоматический выход из заказа' , 'type_id' => 54 ],
], [ 'name' ], [ 'type_id' ]
);
}
if ( ActionTypes :: where ( 'type_id' , 55 ) -> count () == 0 ) {
$types = ActionTypes :: upsert ([
[ 'name' => 'Вход в заказ' , 'type_id' => 55 ],
], [ 'name' ], [ 'type_id' ]
);
}
}
}