Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/src/CourseBundle/Entity/CStudentPublicationAssignme...

123 lines
2.9 KiB

<?php
/* For licensing terms, see /license.txt */
declare(strict_types=1);
namespace Chamilo\CourseBundle\Entity;
use Chamilo\CourseBundle\Repository\CStudentPublicationAssignmentRepository;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Stringable;
#[ORM\Table(name: 'c_student_publication_assignment')]
#[ORM\Entity(repositoryClass: CStudentPublicationAssignmentRepository::class)]
class CStudentPublicationAssignment implements Stringable
{
#[ORM\Column(name: 'iid', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue]
protected int $iid;
#[ORM\Column(name: 'expires_on', type: 'datetime', nullable: true)]
protected ?DateTime $expiresOn = null;
#[ORM\Column(name: 'ends_on', type: 'datetime', nullable: true)]
protected ?DateTime $endsOn = null;
#[ORM\Column(name: 'add_to_calendar', type: 'integer', nullable: false)]
protected int $eventCalendarId;
#[ORM\Column(name: 'enable_qualification', type: 'boolean', nullable: false)]
protected bool $enableQualification;
#[ORM\OneToOne(inversedBy: 'assignment', targetEntity: CStudentPublication::class)]
#[ORM\JoinColumn(name: 'publication_id', referencedColumnName: 'iid', onDelete: 'CASCADE')]
protected CStudentPublication $publication;
public function __toString(): string
{
return (string) $this->getIid();
}
public function getIid(): int
{
return $this->iid;
}
public function getExpiresOn(): ?DateTime
{
return $this->expiresOn;
}
public function setExpiresOn(DateTime $expiresOn): self
{
$this->expiresOn = $expiresOn;
return $this;
}
public function getEndsOn(): ?DateTime
{
return $this->endsOn;
}
public function setEndsOn(DateTime $endsOn): self
{
$this->endsOn = $endsOn;
return $this;
}
public function getEventCalendarId(): int
{
return $this->eventCalendarId;
}
public function setEventCalendarId(int $eventCalendarId): self
{
$this->eventCalendarId = $eventCalendarId;
return $this;
}
public function getEnableQualification(): bool
{
return $this->enableQualification;
}
public function setEnableQualification(bool $enableQualification): self
{
$this->enableQualification = $enableQualification;
return $this;
}
public function getPublication(): CStudentPublication
{
return $this->publication;
}
public function setPublication(CStudentPublication $publication): self
{
$this->publication = $publication;
return $this;
}
/*
public function getResourceIdentifier(): int
{
return $this->getIid();
}
public function getResourceName(): string
{
return (string) $this->getIid();
}
public function setResourceName(string $name): self
{
//return $this->setTitle($name);
}*/
}