Created
August 1, 2018 09:55
-
-
Save BerezhniyDmitro/8f1c57d17c3384496be3a697169ef035 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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