Resolve "New invoice service" #1669

Merged
korina.cordero merged 105 commits from 744-new-invoice-service into master 2023-11-22 08:54:54 +00:00
2 changed files with 26 additions and 2 deletions
Showing only changes of commit 1261fc1d20 - Show all commits

View file

@ -152,7 +152,7 @@ class PartnerController extends ApiController
$rev->setRating($rating) $rev->setRating($rating)
->setMessage($msg) ->setMessage($msg)
->setPartner($partner) ->setPartner($partner)
->setMobileSession($this->session); // TODO: add support new customer user entity ->setCustomerSession($this->session); // NOTE: using new customer session entity
// save to db // save to db
$this->em->persist($rev); $this->em->persist($rev);

View file

@ -48,10 +48,24 @@ class Review
// mobile session that sent review // mobile session that sent review
/** /**
* @ORM\ManyToOne(targetEntity="MobileSession", inversedBy="reviews") * @ORM\ManyToOne(targetEntity="MobileSession", inversedBy="reviews")
* @ORM\JoinColumn(name="mobile_session_id", referencedColumnName="id") * @ORM\JoinColumn(name="mobile_session_id", referencedColumnName="id", nullable=true)
*/ */
protected $mobile_session; protected $mobile_session;
// customer session (new) that sent review
/**
* @ORM\ManyToOne(targetEntity="CustomerSession", inversedBy="reviews")
* @ORM\JoinColumn(name="customer_session_id", referencedColumnName="id", nullable=true)
*/
protected $customer_session;
// customer user sent review
/**
* @ORM\ManyToOne(targetEntity="MobileSession", inversedBy="reviews")
* @ORM\JoinColumn(name="mobile_session_id", referencedColumnName="id")
*/
protected $customer;
public function __construct() public function __construct()
{ {
$this->date_create = new DateTime(); $this->date_create = new DateTime();
@ -113,5 +127,15 @@ class Review
{ {
return $this->mobile_session; return $this->mobile_session;
} }
public function setCustomerSession(CustomerSession $customer_session)
{
$this->customer_session = $customer_session;
return $this;
}
public function getCustomerSession()
{
return $this->customer_session;
}
} }