
Updates to Summit Serializer * added new collection presentation_action_types Presentation Action Types GET /api/v1/summits/{id}/presentation-action-types filtering 'label' => ['=@', '=='], ordering 'id', 'order', 'label', required scopes %s/summits/read %s/summits/read/all auth groups * SuperAdmins * Administrators * SummitAdministrators * TrackChairsAdmins GET /api/v1/summits/{id}/presentation-action-types/csv filtering 'name' => ['=@', '=='], 'label' => ['=@', '=='], 'is_enabled' => ['=='], ordering 'id', 'order', 'label', required scopes %s/summits/read %s/summits/read/all auth groups * SuperAdmins * Administrators * SummitAdministrators * TrackChairsAdmins POST /api/v1/summits/{id}/presentation-action-types payload 'label' => 'required|string|max:255', required scopes %s/summits/write auth groups * SuperAdmins * Administrators * SummitAdministrators * TrackChairsAdmins PUT /api/v1/summits/{id}/presentation-action-types/{action_id} payload 'label' => 'sometimes|string|max:255', 'order' => 'sometimes|integer|min:1', required scopes %s/summits/write auth groups * SuperAdmins * Administrators * SummitAdministrators * TrackChairsAdmins GET /api/v1/summits/{id}/presentation-action-types/{action_id} required scopes %s/summits/read %s/summits/read/all auth groups * SuperAdmins * Administrators * SummitAdministrators * TrackChairsAdmins DELETE /api/v1/summits/{id}/presentation-action-types/{action_id} required scopes %s/summits/write auth groups * SuperAdmins * Administrators * SummitAdministrators * TrackChairsAdmins Change-Id: Ibec7591b88470b59d9f942a553a8335a57e9db9e Signed-off-by: smarcet <smarcet@gmail.com>
147 lines
3.5 KiB
PHP
147 lines
3.5 KiB
PHP
<?php namespace models\summit;
|
|
/**
|
|
* Copyright 2021 OpenStack Foundation
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
**/
|
|
|
|
use models\main\Member;
|
|
use models\utils\SilverstripeBaseModel;
|
|
use Doctrine\ORM\Mapping AS ORM;
|
|
/**
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="PresentationAction")
|
|
* Class PresentationAction
|
|
* @package models\summit
|
|
*/
|
|
class PresentationAction extends SilverstripeBaseModel
|
|
{
|
|
/**
|
|
* @ORM\Column(name="IsCompleted", type="boolean")
|
|
* @var boolean
|
|
*/
|
|
private $is_completed;
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->is_completed = false;
|
|
}
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Presentation", inversedBy="actions", fetch="EXTRA_LAZY")
|
|
* @ORM\JoinColumn(name="PresentationID", referencedColumnName="ID", onDelete="CASCADE")
|
|
* @var Presentation
|
|
*/
|
|
private $presentation;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="PresentationActionType", fetch="EXTRA_LAZY")
|
|
* @ORM\JoinColumn(name="TypeID", referencedColumnName="ID", onDelete="CASCADE")
|
|
* @var PresentationActionType
|
|
*/
|
|
private $type;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="models\main\Member", fetch="EXTRA_LAZY")
|
|
* @ORM\JoinColumn(name="CreatedByID", referencedColumnName="ID", onDelete="SET NULL")
|
|
* @var Member
|
|
*/
|
|
private $created_by;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="models\main\Member", fetch="EXTRA_LAZY")
|
|
* @ORM\JoinColumn(name="UpdateByID", referencedColumnName="ID", onDelete="SET NULL")
|
|
* @var Member
|
|
*/
|
|
private $updated_by;
|
|
|
|
/**
|
|
* @return bool
|
|
*/
|
|
public function isCompleted(): bool
|
|
{
|
|
return $this->is_completed;
|
|
}
|
|
|
|
/**
|
|
* @param bool $is_completed
|
|
*/
|
|
public function setIsCompleted(bool $is_completed): void
|
|
{
|
|
$this->is_completed = $is_completed;
|
|
}
|
|
|
|
/**
|
|
* @return Presentation
|
|
*/
|
|
public function getPresentation(): Presentation
|
|
{
|
|
return $this->presentation;
|
|
}
|
|
|
|
/**
|
|
* @param Presentation $presentation
|
|
*/
|
|
public function setPresentation(Presentation $presentation): void
|
|
{
|
|
$this->presentation = $presentation;
|
|
}
|
|
|
|
/**
|
|
* @return PresentationActionType
|
|
*/
|
|
public function getType(): PresentationActionType
|
|
{
|
|
return $this->type;
|
|
}
|
|
|
|
/**
|
|
* @param PresentationActionType $type
|
|
*/
|
|
public function setType(PresentationActionType $type): void
|
|
{
|
|
$this->type = $type;
|
|
}
|
|
|
|
/**
|
|
* @return Member
|
|
*/
|
|
public function getCreatedBy(): ?Member
|
|
{
|
|
return $this->created_by;
|
|
}
|
|
|
|
/**
|
|
* @param Member $created_by
|
|
*/
|
|
public function setCreatedBy(Member $created_by): void
|
|
{
|
|
$this->created_by = $created_by;
|
|
}
|
|
|
|
/**
|
|
* @return Member
|
|
*/
|
|
public function getUpdatedBy(): ?Member
|
|
{
|
|
return $this->updated_by;
|
|
}
|
|
|
|
/**
|
|
* @param Member $updated_by
|
|
*/
|
|
public function setUpdatedBy(Member $updated_by): void
|
|
{
|
|
$this->updated_by = $updated_by;
|
|
}
|
|
|
|
|
|
} |