<?php/* vim: set ts=4 sw=4 sts=4 et: *//** * Account Notes Module * * @category X-Cart_5_5_Module * @package AccountNotes * @author CFL Systems, Inc. <support@cflsystems.com> * @copyright 2022 CFL Systems, Inc. All rights reserved. * @license License Agreement - https://www.cflsystems.com/software-license-agreement.html * @link https://www.cflsystems.com/account-notes-for-x-cart-5.html */namespace CSI\AccountNotes\Model;use XLite\Model\Profile;use Doctrine\ORM\Mapping as ORM;/** * The "account notes" model class * * @ORM\Entity * * @ORM\Table (name="csi_account_notes") */class AccountNotes extends \XLite\Model\AEntity{ /** * Account Note unique ID * * @var integer * * @ORM\Id * @ORM\GeneratedValue (strategy="AUTO") * @ORM\Column (type="integer") */ protected $id; /** * The profile id account note applies to * * @var Profile * * @ORM\ManyToOne (targetEntity="XLite\Model\Profile", inversedBy="accountNotes") * @ORM\JoinColumn (name="profile_id", referencedColumnName="profile_id") */ protected $profile; /** * Account Note creator profile id * * @var integer * * @ORM\Column (type="integer") */ protected $ownerId; /** * Account Note title * * @var string * * @ORM\Column (type="string", length=255) */ protected $noteTitle = ''; /** * Account Note text * * @var string * * @ORM\Column (type="text") */ protected $noteText = ''; /** * Timestamp of Account Note creation date * * @var integer * * @ORM\Column (type="integer") */ protected $dateAdded = 0; /** * Account Note flag * * @var string * * @ORM\Column (type="string", length=6) */ protected $noteFlag = 'none'; /** * Allow account to see note * * @var boolean * * @ORM\Column (type="boolean") */ protected $customerEnabled = false; /** * Allow other admins to modify note * * @var boolean * * @ORM\Column (type="boolean") */ protected $adminEnabled = true; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set ownerId * * @param integer $ownerId Note owner Id * * @return self */ public function setOwnerId(int $ownerId) { $this->ownerId = $ownerId; return $this; } /** * Get ownerId * * @return integer */ public function getOwnerId() { return $this->ownerId; } /** * Set noteTitle * * @param string $noteTitle Note title * * @return self */ public function setNoteTitle(string $noteTitle) { $this->noteTitle = $noteTitle; return $this; } /** * Get noteTitle * * @return string */ public function getNoteTitle() { return $this->noteTitle; } /** * Set noteText * * @param text $noteText Note content * * @return self */ public function setNoteText(string $noteText) { $this->noteText = $noteText; return $this; } /** * Get noteText * * @return text */ public function getNoteText() { return $this->noteText; } /** * Set dateAdded * * @param integer $dateAdded date note is added * * @return self */ public function setDateAdded(int $dateAdded) { $this->dateAdded = $dateAdded; return $this; } /** * Get dateAdded * * @return integer */ public function getDateAdded() { return $this->dateAdded; } /** * Set noteFlag * * @param string $noteFlag Note flag * * @return self */ public function setNoteFlag(string $noteFlag) { $this->noteFlag = $noteFlag; return $this; } /** * Get noteFlag * * @return string */ public function getNoteFlag() { return $this->noteFlag; } /** * Set customerEnabled * * @param boolean $customerEnabled Can customer see the note * * @return self */ public function setCustomerEnabled(bool $customerEnabled) { $this->customerEnabled = $customerEnabled; return $this; } /** * Get customerEnabled * * @return boolean */ public function getCustomerEnabled() { return $this->customerEnabled; } /** * Set adminEnabled * * @param boolean $adminEnabled Can non-owner admin modify the note * * @return self */ public function setAdminEnabled(bool $adminEnabled) { $this->adminEnabled = $adminEnabled; return $this; } /** * Get adminEnabled * * @return boolean */ public function getAdminEnabled() { return $this->adminEnabled; } /** * Set profile * * @param Profile $profile Customer profile the note applies to * * @return self */ public function setProfile(Profile $profile = null) { $this->profile = $profile; return $this; } /** * Get profile * * @return Profile */ public function getProfile() { return $this->profile; }}