<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use App\Notification\SendExpertViewObjectNotification;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220503151800 extends AbstractMigration
{
public function getDescription(): string
{
return 'Create Expert Send Email template';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs 2022-03-30 14:35:44
$text_email_no = "%header% <p>Hi %expert_name%, du mottok en ny melding fra et objekt</p> <p>User: %user_name%</p> <p>Email: %user_email%</p> <p>Telefon: %user_phone%</p> <p>Objekt: %object_link%</p> <p>%message%</p> %footer%";
$text_email_en = "%header% <p>Hi %expert_name%, you received a new message from a object</p> <p>User: %user_name%</p> <p>Email: %user_email%</p> <p>Phone: %user_phone%</p> <p>Object: %object_link%</p> <p>%message%</p> %footer%";
$this->addSql("INSERT INTO notification_template (notification_type,notification_language,text_email,text_sms,subject,created_at,updated_at,text_system) VALUES
(" . SendExpertViewObjectNotification::TYPE . " ,'nor-NO','{$text_email_no}',NULL,'Spesialist','" . date('Y-m-d H:i:s') . "','" . date('Y-m-d H:i:s') . "',NULL),
(" . SendExpertViewObjectNotification::TYPE . ",'eng-GB','{$text_email_en}',NULL,'Specialist','" . date('Y-m-d H:i:s') . "','" . date('Y-m-d H:i:s') . "',NULL);");
}
public function down(Schema $schema): void
{
$this->addSql('DELETE FROM notification_template WHERE notification_type=' . SendExpertViewObjectNotification::TYPE);
}
}