Skip to content

Instantly share code, notes, and snippets.

@BerezhniyDmitro
Created August 1, 2018 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BerezhniyDmitro/8f1c57d17c3384496be3a697169ef035 to your computer and use it in GitHub Desktop.
Save BerezhniyDmitro/8f1c57d17c3384496be3a697169ef035 to your computer and use it in GitHub Desktop.
<?php
namespace App\Models\Page\ServicePage\Entity;
use App\Models\Page\Page;
use App\Models\Page\Sitemap;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\OneToOne;
/**
* @ORM\Table(name="page_sitemap_new")
* @ORM\Entity(repositoryClass="App\Models\Page\ServicePage\Repository\SitemapRepository")
*/
class ServicePageSitemap
{
/**
* ServicePageSitemap constructor.
* @param $is_use_html
* @param $is_use_xml
* @param $priority
* @param $change_frequency
*/
public function __construct($is_use_html, $is_use_xml, $priority, $change_frequency)
{
$this->is_use_html = (boolean) $is_use_html;
$this->is_use_xml = (boolean) $is_use_xml;
$this->priority = $priority;
$this->change_frequency = $change_frequency;
$this->last_modified = new DateTime();
// parent::__construct($is_use_html, $is_use_xml, $priority, $change_frequency);
}
/**
* @ORM\Id
* @ORM\Column(type="integer", name="id")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="boolean", name="is_xml_show")
*/
protected $is_use_xml;
/**
* @ORM\Column(type="boolean", name="is_html_show")
*/
protected $is_use_html;
/**
* @ORM\Column(type="string", name="priority")
*/
protected $priority;
/**
* @ORM\Column(type="string", name="change_frequency")
*/
protected $change_frequency;
/**
* @ORM\Column(type="datetime", name="last_modified")
*/
protected $last_modified;
/**
* @OneToOne(targetEntity="ServicePage", mappedBy="sitemap", cascade={"persist", "remove"})
*/
protected $page;
//
// /**
// * @param Page $page
// */
// public function changePage(Page $page)
// {
// $this->page = $page;
// }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment