app/Plugin/CustomerReview42/Entity/CustomerReviewList.php line 21

Open in your IDE?
  1. <?php
  2. namespace Plugin\CustomerReview42\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Eccube\Entity\AbstractEntity;
  5. use Eccube\Entity\Product;
  6. use Eccube\Entity\Customer;
  7. /**
  8.  * CustomerReviewList
  9.  *
  10.  * @ORM\Table(name="plg_customer_review_list", indexes={
  11.  *     @ORM\Index(name="idx_create_date", columns={"product_id","create_date"}),
  12.  *     @ORM\Index(name="idx_recommend_level", columns={"product_id","recommend_level"})
  13.  * })
  14.  * @ORM\Entity(repositoryClass="Plugin\CustomerReview42\Repository\CustomerReviewListRepository")
  15.  */
  16. class CustomerReviewList extends AbstractEntity
  17. {
  18.     // order by
  19.     /**
  20.      * 投稿日が新しい順
  21.     **/
  22.     const POST_NEWER 1;
  23.     /**
  24.      * 投稿日が古い順
  25.     **/
  26.     const POST_OLDER 2;
  27.     /**
  28.      * 評価が高い順
  29.     **/
  30.     const RECOMMEND_HIGHER 3;
  31.     /**
  32.      * 評価が低い順
  33.     **/
  34.     const RECOMMEND_LOWER 4;
  35.     /**
  36.      * @var int
  37.      *
  38.      * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  39.      * @ORM\Id
  40.      * @ORM\GeneratedValue(strategy="IDENTITY")
  41.      */
  42.     private $id;
  43.     /**
  44.      * @var Product
  45.      *
  46.      * @ORM\ManyToOne(targetEntity="Eccube\Entity\Product")
  47.      * @ORM\JoinColumns({
  48.      *   @ORM\JoinColumn(name="product_id", referencedColumnName="id")
  49.      * })
  50.      */
  51.     private $Product;
  52.     /**
  53.      * @var Customer
  54.      *
  55.      * @ORM\ManyToOne(targetEntity="Eccube\Entity\Customer")
  56.      * @ORM\JoinColumns({
  57.      *   @ORM\JoinColumn(name="customer_id", referencedColumnName="id")
  58.      * })
  59.      */
  60.     private $Customer;
  61.     /**
  62.      * @var Status
  63.      *
  64.      * @ORM\ManyToOne(targetEntity="Plugin\CustomerReview42\Entity\CustomerReviewStatus")
  65.      * @ORM\JoinColumns({
  66.      *   @ORM\JoinColumn(name="status", referencedColumnName="id")
  67.      * })
  68.      */
  69.     private $Status;
  70.     /**
  71.      * @var boolean
  72.      *
  73.      * @ORM\Column(name="purchase", type="boolean", options={"default":false})
  74.      */
  75.     private $purchase false;
  76.     /**
  77.      * @var boolean
  78.      *
  79.      * @ORM\Column(name="grant_point", type="boolean", options={"default":false})
  80.      */
  81.     private $grant_point false;
  82.     /**
  83.      * @var string
  84.      *
  85.      * @ORM\Column(name="reviewer_name", type="string", length=255)
  86.      */
  87.     private $reviewer_name;
  88.     /**
  89.      * @var int
  90.      *
  91.      * @ORM\Column(name="recommend_level", type="smallint", options={"unsigned":true})
  92.      */
  93.     private $recommend_level;
  94.     /**
  95.      * @var string
  96.      *
  97.      * @ORM\Column(name="title", type="string", length=255)
  98.      */
  99.     private $title;
  100.     /**
  101.      * @var string
  102.      *
  103.      * @ORM\Column(name="comment", type="text")
  104.      */
  105.     private $comment;
  106.     /**
  107.      * @var \DateTime
  108.      *
  109.      * @ORM\Column(name="create_date", type="datetimetz")
  110.      */
  111.     private $create_date;
  112.     /**
  113.      * @var \DateTime
  114.      *
  115.      * @ORM\Column(name="update_date", type="datetimetz")
  116.      */
  117.     private $update_date;
  118.     /**
  119.      * @return int
  120.      */
  121.     public function getId()
  122.     {
  123.         return $this->id;
  124.     }
  125.     /**
  126.      * @param string $id
  127.      *
  128.      * @return $this
  129.      */
  130.     public function setId($id)
  131.     {
  132.         $this->id $id;
  133.         return $this;
  134.     }
  135.     /**
  136.      * @return Product
  137.      */
  138.     public function getProduct()
  139.     {
  140.         return $this->Product;
  141.     }
  142.     /**
  143.      * @param Product $Product
  144.      *
  145.      * @return $this
  146.      */
  147.     public function setProduct(Product $Product)
  148.     {
  149.         $this->Product $Product;
  150.         return $this;
  151.     }
  152.     /**
  153.      * @return Customer
  154.      */
  155.     public function getCustomer()
  156.     {
  157.         return $this->Customer;
  158.     }
  159.     /**
  160.      * @param Customer $Customer
  161.      *
  162.      * @return $this
  163.      */
  164.     public function setCustomer(Customer $Customer)
  165.     {
  166.         $this->Customer $Customer;
  167.         return $this;
  168.     }
  169.     /**
  170.      * @return CustomerReviewStatus
  171.      */
  172.     public function getStatus()
  173.     {
  174.         return $this->Status;
  175.     }
  176.     /**
  177.      * @param CustomerReviewStatus $Status
  178.      *
  179.      * @return $this
  180.      */
  181.     public function setStatus(CustomerReviewStatus $Status)
  182.     {
  183.         $this->Status $Status;
  184.         return $this;
  185.     }
  186.     /**
  187.      * @return boolean
  188.      */
  189.     public function isPurchase()
  190.     {
  191.         return $this->purchase;
  192.     }
  193.     /**
  194.      * @param boolean $purchase
  195.      *
  196.      * @return $this
  197.      */
  198.     public function setPurchase($purchase)
  199.     {
  200.         $this->purchase $purchase;
  201.         return $this;
  202.     }
  203.     /**
  204.      * @return boolean
  205.      */
  206.     public function isGrantPoint()
  207.     {
  208.         return $this->grant_point;
  209.     }
  210.     /**
  211.      * @param boolean $grant_point
  212.      *
  213.      * @return $this
  214.      */
  215.     public function setGrantPoint($grant_point)
  216.     {
  217.         $this->grant_point $grant_point;
  218.         return $this;
  219.     }
  220.     /**
  221.      * @return string
  222.      */
  223.     public function getReviewerName()
  224.     {
  225.         return $this->reviewer_name;
  226.     }
  227.     /**
  228.      * @param string $reviewer_name
  229.      *
  230.      * @return ProductReview
  231.      */
  232.     public function setReviewerName($reviewer_name)
  233.     {
  234.         $this->reviewer_name $reviewer_name;
  235.         return $this;
  236.     }
  237.     /**
  238.      * @return int
  239.      */
  240.     public function getRecommendLevel()
  241.     {
  242.         return $this->recommend_level;
  243.     }
  244.     /**
  245.      * @param int $recommend_level
  246.      *
  247.      * @return ProductReview
  248.      */
  249.     public function setRecommendLevel($recommend_level)
  250.     {
  251.         $this->recommend_level $recommend_level;
  252.         return $this;
  253.     }
  254.     /**
  255.      * @return string
  256.      */
  257.     public function getTitle()
  258.     {
  259.         return $this->title;
  260.     }
  261.     /**
  262.      * @param string $title
  263.      *
  264.      * @return ProductReview
  265.      */
  266.     public function setTitle($title)
  267.     {
  268.         $this->title $title;
  269.         return $this;
  270.     }
  271.     /**
  272.      * @return string
  273.      */
  274.     public function getComment()
  275.     {
  276.         return $this->comment;
  277.     }
  278.     /**
  279.      * @param string $comment
  280.      *
  281.      * @return ProductReview
  282.      */
  283.     public function setComment($comment)
  284.     {
  285.         $this->comment $comment;
  286.         return $this;
  287.     }
  288.     /**
  289.      * @return \DateTime
  290.      */
  291.     public function getCreateDate()
  292.     {
  293.         return $this->create_date;
  294.     }
  295.     /**
  296.      * @param \DateTime $createDate
  297.      *
  298.      * @return $this
  299.      */
  300.     public function setCreateDate($createDate)
  301.     {
  302.         $this->create_date $createDate;
  303.         return $this;
  304.     }
  305.     /**
  306.      * @return \DateTime
  307.      */
  308.     public function getUpdateDate()
  309.     {
  310.         return $this->update_date;
  311.     }
  312.     /**
  313.      * @param \DateTime $updateDate
  314.      *
  315.      * @return $this
  316.      */
  317.     public function setUpdateDate($updateDate)
  318.     {
  319.         $this->update_date $updateDate;
  320.         return $this;
  321.     }
  322. }