improve event deletion and event registration cancelation

This commit is contained in:
Roland Schneider
2021-10-08 23:15:49 +02:00
parent 09f329050f
commit f0bf8684e4
12 changed files with 96 additions and 68 deletions

View File

@@ -1,6 +1,7 @@
<?php
namespace customerapi\models\dto;
use common\helpers\AppDateTimeHelper;
use customerapi\models\available\EventAvailable;
class EventDTO extends \yii\base\Model
@@ -28,6 +29,7 @@ class EventDTO extends \yii\base\Model
"id" => "id",
"start" => "start",
"end" => "end",
"deleted_at" => "deleted_at",
"seat_count" => "seat_count",
"active" => "active",
"reservationCount" => "registrationCount",
@@ -53,7 +55,8 @@ class EventDTO extends \yii\base\Model
$dto->seat_count = $event->seat_count;
$dto->created_at = $event->created_at;
$dto->updated_at = $event->updated_at;
$dto->deleted_at = $event->deleted_at;
$dto->deleted_at = AppDateTimeHelper::convertMySqlDatetimeToPhpInteger($event->deleted_at);
$dto->active = $event->active;
return $dto;