<?php
/**
* Created by PhpStorm.
* User: apple
* Date: 29/03/19
* Time: 3:08 PM
*/
namespace App\AppBundle\MainBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use JsonSerializable;
use DateTime;
/**
* AddOns
*
* @ORM\Entity(repositoryClass="App\AppBundle\MainBundle\Repository\OrdersRepository")
* @ORM\Table(name="orders")
* @ORM\HasLifecycleCallbacks()
*/
class Orders implements JsonSerializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var User
* @ORM\ManyToOne(targetEntity="User", inversedBy="orders")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
private $user;
/**
* @var User
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="supplier_id", referencedColumnName="id")
*/
private $supplier;
/**
* @var PS_Add_Spot
* @ORM\ManyToOne(targetEntity="PS_Add_Spot", inversedBy="orders")
* @ORM\JoinColumn(name="add_spot_id", referencedColumnName="id")
*/
private $add_spot;
/**
* @var Orders_Pricing
* @ORM\OneToOne(targetEntity="Orders_Pricing", mappedBy="order")
*/
private $orders_pricing;
/**
* @var Orders_Refund
* @ORM\OneToOne(targetEntity="Orders_Refund", mappedBy="order")
*/
private $order_refund;
/**
* @ORM\OneToMany(targetEntity="Orders_Suppliers_Transfer", mappedBy="order")
*/
private $order_supplier_transfer;
/**
* @ORM\OneToMany(targetEntity="Orders_Flexible", mappedBy="order")
*/
private $ordersFlexible;
/**
* @ORM\OneToOne(targetEntity="Order_Flexible_Detail", mappedBy="order")
*/
private $orderFlexibleDetail;
/**
* @ORM\OneToMany(targetEntity="Orders_Monthly", mappedBy="order")
*/
private $ordersMonthly;
/**
* @ORM\Column(type="integer", nullable=true, options={"default" : 0})
*/
private $booking_type;//0 - Hourly, 1 - Flexible, 2 - Monthly
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*/
private $is_completed;
/**
* @var DateTime
* @ORM\Column(type="datetime", nullable=false)
* @Assert\NotBlank()
*/
private $start_time;
/**
* @var DateTime
* @ORM\Column(type="datetime", nullable=false)
* @Assert\NotBlank()
*/
private $end_time;
/**
* @var DateTime
* @ORM\Column(type="datetime", nullable=false)
* @Assert\NotBlank()
*/
private $initial_end_time;
/**
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $vehicle_model;
/**
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $vehicle_license_plate;
/**
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $spot_title;
/**
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $spot_address;
/**
* @ORM\Column(type="string", nullable=true)
*
*/
private $spot_street_name;
/**
* @ORM\Column(type="string", nullable=true)
*
*/
private $spot_street_number;
/**
* @ORM\Column(type="string", nullable=true)
*
*/
private $spot_postal_code;
/**
* @ORM\Column(type="string", nullable=true)
*
*/
private $spot_city;
/**
* @ORM\Column(type="string", nullable=true)
*
*/
private $spot_county;
/**
* @ORM\Column(type="string", nullable=true)
*
*/
private $spot_state;
/**
* @ORM\Column(type="string", nullable=true)
*
*/
private $spot_country;
/**
* @ORM\Column(type="decimal", precision=11, scale=8)
*
*/
private $spot_latitude;
/**
* @ORM\Column(type="decimal", precision=11, scale=8)
*
*/
private $spot_longitude;
/**
* @ORM\Column(type="string", nullable=true)
*
*/
private $spot_spot_number;
/**
* @ORM\Column(type="string", length = 5000, nullable=false)
*
*/
private $spot_about_spot;
/**
* @var WP_Property_Type
* @ORM\ManyToOne(targetEntity="WP_Property_Type")
* @ORM\JoinColumn(name="property_type_id", referencedColumnName="id")
*/
private $spot_property_type;
/**
* @var WP_Parking_Type
* @ORM\ManyToOne(targetEntity="WP_Parking_Type")
* @ORM\JoinColumn(name="parking_type_id", referencedColumnName="id")
*/
private $spot_parking_type;
/**
* @var WP_Access_Type
* @ORM\ManyToOne(targetEntity="WP_Access_Type")
* @ORM\JoinColumn(name="access_type_id", referencedColumnName="id")
*/
private $spot_access_type;
/**
* @ORM\Column(type="string", nullable=true)
*
*/
private $spot_access_type_detail;
/**
* @var WP_Max_Vehicle_Size
* @ORM\ManyToOne(targetEntity="WP_Max_Vehicle_Size")
* @ORM\JoinColumn(name="max_vehicle_size_id", referencedColumnName="id")
*/
private $spot_max_vehicle_size;
/**
* @var WP_Max_Vehicle_Size_Type
* @ORM\ManyToOne(targetEntity="WP_Max_Vehicle_Size_Type")
* @ORM\JoinColumn(name="max_vehicle_size_type_id", referencedColumnName="id")
*/
private $spot_max_vehicle_size_type;
/**
* @var WP_Electric_Charger_Type
* @ORM\ManyToOne(targetEntity="WP_Electric_Charger_Type")
* @ORM\JoinColumn(name="max_electric_charger_type_id", referencedColumnName="id", nullable=true)
*/
private $spot_electric_charger_type;
/**
* @ORM\Column(type="boolean", nullable=false)
*
*/
private $have_electric_charger = false;
/**
* @var WP_Parking_Max_Height
* @ORM\ManyToOne(targetEntity="WP_Parking_Max_Height")
* @ORM\JoinColumn(name="parking_max_height_id", referencedColumnName="id", nullable=true)
*/
private $parking_max_height;
/**
* @ORM\Column(type="string", length=1000, nullable=false)
*
*/
private $spot_special_tips;
/**
* @ORM\Column(type="string", nullable=true)
*
*/
private $spot_parking_type_other;
/**
* @ORM\Column(type="string", nullable=true)
*
*/
private $spot_property_type_other;
/**
* @ORM\Column(type="string", nullable=true)
*
*/
private $spot_access_type_other;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*
*/
private $is_promo_code_applied;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*
*/
private $is_order_paid;
/**
* @var Supplier_To_User_Ratings
* @ORM\OneToOne(targetEntity="Supplier_To_User_Ratings", mappedBy="order")
*/
private $supplier_to_user_ratings;
/**
* @var User_Spot_Reviews
* @ORM\OneToOne(targetEntity="User_Spot_Reviews", mappedBy="order")
*/
private $user_spot_reviews;
/**
* @var WP_Currency
* @ORM\ManyToOne(targetEntity="WP_Currency")
* @ORM\JoinColumn(name="wp_currency_id", referencedColumnName="id")
*/
private $wp_currency;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $spot_is_verified;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*/
private $is_email_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*/
private $is_sms_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*/
private $is_notification_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 1})
*/
private $is_active;
/**
* @var WP_Payment
* @ORM\ManyToOne(targetEntity="WP_Payment")
* @ORM\JoinColumn(name="wp_payment_id", referencedColumnName="id", nullable=true)
*/
private $wp_payment;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $payment_method_type;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $pay_stripe_payment_method_id;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $pay_stripe_customer_id;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $pay_stripe_card_id;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $pay_stripe_payment_intent_id;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $pay_stripe_extend_payment_intent_id;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $pay_name;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $pay_card_type;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $pay_last_four;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $pay_brand;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $pay_expiry_month;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $pay_expiry_year;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 1})
*/
private $is_extended;
/**
* One user has many tokens. This is the inverse side.
* @ORM\OneToMany(targetEntity="Orders_Extended", mappedBy="orders")
*/
private $orders_extended;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*/
private $is_completion_email_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*/
private $is_completion_sms_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*
*/
private $is_completion_notification_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*
*/
private $is_extend_booking_email_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*
*/
private $is_extend_booking_sms_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*
*/
private $is_extend_booking_notification_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*
*/
private $is_pre_start_email_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*
*/
private $is_pre_start_sms_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*
*/
private $is_pre_start_notification_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*
*/
private $is_start_email_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*
*/
private $is_start_sms_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*
*/
private $is_start_notification_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*
*/
private $has_parking_ended;
/**
* @var DateTime
* @ORM\Column(type="datetime", nullable=true)
*
*/
private $parking_end_time;
/**
* @var DateTime
* @ORM\Column(type="datetime", nullable=true)
*
*/
private $booking_cancelled_on;
/**
* @ORM\Column(type="integer", nullable=false, options={"default" : 0})
*
*/
private $booking_status;//0 - Upcoming, 1 - On Going, 2 - Completed, 3 - Cancelled by Spot Provider, 4 - Cancelled by Spot User, 5 - Cancelled From System, 6 - Refunded, 7 - Non-Refunded
/**
* @ORM\Column(type="string", nullable=true)
*
*/
private $booking_cancelled_reason;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*
*/
private $refund_amount;
/**
* @var string
* @ORM\Column(type="string", nullable=true)
*
*/
private $refund_reference_number;
/**
* @var datetime
* @ORM\Column(type="date", nullable=true)
*
*/
private $refund_initiate_date;
/**
* @var datetime
* @ORM\Column(type="date", nullable=true)
*
*/
private $refund_processed_date;
/**
* @var boolean
* @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
*
*/
private $is_refund_processed = 0;
//For monthly parking. If user has applied for cancellation of renewal then from next month onwards his monthly subscription for this booking won't be availed
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 1})
*
*/
private $is_renewal_active;
//Only applicable for monthly booking
/**
* @var DateTime
* @ORM\Column(type="date", nullable=true)
*
*/
private $next_renewal_date;
//Only applicable for monthly booking
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*
*/
private $next_renewal_amount;
//Only applicable for monthly booking
/**
* @var DateTime
* @ORM\Column(type="date", nullable=true)
*
*/
private $current_monthly_booking_end_date;
private $ordersMonthlyData;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*/
private $is_payout_completed = false;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*/
private $is_order_monthly_requested_end_subscription = false;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return User
*/
public function getUser()
{
return $this->user;
}
/**
* @param mixed $user
*/
public function setUser($user)
{
$this->user = $user;
}
/**
* @return User
*/
public function getSupplier()
{
return $this->supplier;
}
/**
* @param mixed $supplier
*/
public function setSupplier($supplier)
{
$this->supplier = $supplier;
}
/**
* @return PS_Add_Spot
*/
public function getAddSpot()
{
return $this->add_spot;
}
/**
* @param mixed $add_spot
*/
public function setAddSpot($add_spot)
{
$this->add_spot = $add_spot;
}
/**
* @return mixed
*/
public function getBookingType()
{
return $this->booking_type;
}
/**
* @param mixed $booking_type
*/
public function setBookingType($booking_type)
{
$this->booking_type = $booking_type;
}
/**
* @return mixed
*/
public function getIsCompleted()
{
return $this->is_completed;
}
/**
* @param mixed $is_completed
*/
public function setIsCompleted($is_completed)
{
$this->is_completed = $is_completed;
}
/**
* @return DateTime
*/
public function getStartTime()
{
return $this->start_time;
}
/**
* @param mixed $start_time
*/
public function setStartTime($start_time)
{
$this->start_time = $start_time;
}
/**
* @return DateTime
*/
public function getEndTime()
{
return $this->end_time;
}
/**
* @param mixed $end_time
*/
public function setEndTime($end_time)
{
$this->end_time = $end_time;
}
/**
* @return mixed
*/
public function getInitialEndTime()
{
return $this->initial_end_time;
}
/**
* @param mixed $initial_end_time
*/
public function setInitialEndTime($initial_end_time)
{
$this->initial_end_time = $initial_end_time;
}
/**
* @return mixed
*/
public function getVehicleModel()
{
return $this->vehicle_model;
}
/**
* @param mixed $vehicle_model
*/
public function setVehicleModel($vehicle_model)
{
$this->vehicle_model = $vehicle_model;
}
/**
* @return mixed
*/
public function getVehicleLicensePlate()
{
return $this->vehicle_license_plate;
}
/**
* @param mixed $vehicle_license_plate
*/
public function setVehicleLicensePlate($vehicle_license_plate)
{
$this->vehicle_license_plate = $vehicle_license_plate;
}
/**
* @return mixed
*/
public function getSpotTitle()
{
return $this->spot_title;
}
/**
* @param mixed $spot_title
*/
public function setSpotTitle($spot_title)
{
$this->spot_title = $spot_title;
}
/**
* @return mixed
*/
public function getSpotAddress()
{
return $this->spot_address;
}
/**
* @param mixed $spot_address
*/
public function setSpotAddress($spot_address)
{
$this->spot_address = $spot_address;
}
/**
* @return mixed
*/
public function getSpotStreetName()
{
return $this->spot_street_name;
}
/**
* @param mixed $spot_street_name
*/
public function setSpotStreetName($spot_street_name)
{
$this->spot_street_name = $spot_street_name;
}
/**
* @return mixed
*/
public function getSpotStreetNumber()
{
return $this->spot_street_number;
}
/**
* @param mixed $spot_street_number
*/
public function setSpotStreetNumber($spot_street_number)
{
$this->spot_street_number = $spot_street_number;
}
/**
* @return mixed
*/
public function getSpotPostalCode()
{
return $this->spot_postal_code;
}
/**
* @param mixed $spot_postal_code
*/
public function setSpotPostalCode($spot_postal_code)
{
$this->spot_postal_code = $spot_postal_code;
}
/**
* @return mixed
*/
public function getSpotCity()
{
return $this->spot_city;
}
/**
* @param mixed $spot_city
*/
public function setSpotCity($spot_city)
{
$this->spot_city = $spot_city;
}
/**
* @return mixed
*/
public function getSpotCounty()
{
return $this->spot_county;
}
/**
* @param mixed $spot_county
*/
public function setSpotCounty($spot_county)
{
$this->spot_county = $spot_county;
}
/**
* @return mixed
*/
public function getSpotState()
{
return $this->spot_state;
}
/**
* @param mixed $spot_state
*/
public function setSpotState($spot_state)
{
$this->spot_state = $spot_state;
}
/**
* @return mixed
*/
public function getSpotCountry()
{
return $this->spot_country;
}
/**
* @param mixed $spot_country
*/
public function setSpotCountry($spot_country)
{
$this->spot_country = $spot_country;
}
/**
* @return mixed
*/
public function getSpotLatitude()
{
return $this->spot_latitude;
}
/**
* @param mixed $spot_latitude
*/
public function setSpotLatitude($spot_latitude)
{
$this->spot_latitude = $spot_latitude;
}
/**
* @return mixed
*/
public function getSpotLongitude()
{
return $this->spot_longitude;
}
/**
* @param mixed $spot_longitude
*/
public function setSpotLongitude($spot_longitude)
{
$this->spot_longitude = $spot_longitude;
}
/**
* @return mixed
*/
public function getSpotSpotNumber()
{
return $this->spot_spot_number;
}
/**
* @param mixed $spot_spot_number
*/
public function setSpotSpotNumber($spot_spot_number)
{
$this->spot_spot_number = $spot_spot_number;
}
/**
* @return mixed
*/
public function getSpotAboutSpot()
{
return $this->spot_about_spot;
}
/**
* @param mixed $spot_about_spot
*/
public function setSpotAboutSpot($spot_about_spot)
{
$this->spot_about_spot = $spot_about_spot;
}
/**
* @return mixed
*/
public function getSpotPropertyType()
{
return $this->spot_property_type;
}
/**
* @param mixed $spot_property_type
*/
public function setSpotPropertyType($spot_property_type)
{
$this->spot_property_type = $spot_property_type;
}
/**
* @return mixed
*/
public function getSpotParkingType()
{
return $this->spot_parking_type;
}
/**
* @param mixed $spot_parking_type
*/
public function setSpotParkingType($spot_parking_type)
{
$this->spot_parking_type = $spot_parking_type;
}
/**
* @return mixed
*/
public function getSpotAccessType()
{
return $this->spot_access_type;
}
/**
* @param mixed $spot_access_type
*/
public function setSpotAccessType($spot_access_type)
{
$this->spot_access_type = $spot_access_type;
}
/**
* @return mixed
*/
public function getSpotAccessTypeDetail()
{
return $this->spot_access_type_detail;
}
/**
* @param mixed $spot_access_type_detail
*/
public function setSpotAccessTypeDetail($spot_access_type_detail)
{
$this->spot_access_type_detail = $spot_access_type_detail;
}
/**
* @return mixed
*/
public function getSpotMaxVehicleSize()
{
return $this->spot_max_vehicle_size;
}
/**
* @param mixed $spot_max_vehicle_size
*/
public function setSpotMaxVehicleSize($spot_max_vehicle_size)
{
$this->spot_max_vehicle_size = $spot_max_vehicle_size;
}
/**
* @return mixed
*/
public function getSpotSpecialTips()
{
return $this->spot_special_tips;
}
/**
* @param mixed $spot_special_tips
*/
public function setSpotSpecialTips($spot_special_tips)
{
$this->spot_special_tips = $spot_special_tips;
}
/**
* @return mixed
*/
public function getSpotParkingTypeOther()
{
return $this->spot_parking_type_other;
}
/**
* @param mixed $spot_parking_type_other
*/
public function setSpotParkingTypeOther($spot_parking_type_other)
{
$this->spot_parking_type_other = $spot_parking_type_other;
}
/**
* @return mixed
*/
public function getSpotPropertyTypeOther()
{
return $this->spot_property_type_other;
}
/**
* @param mixed $spot_property_type_other
*/
public function setSpotPropertyTypeOther($spot_property_type_other)
{
$this->spot_property_type_other = $spot_property_type_other;
}
/**
* @return mixed
*/
public function getSpotAccessTypeOther()
{
return $this->spot_access_type_other;
}
/**
* @param mixed $spot_access_type_other
*/
public function setSpotAccessTypeOther($spot_access_type_other)
{
$this->spot_access_type_other = $spot_access_type_other;
}
/**
* @return mixed
*/
public function getIsPromoCodeApplied()
{
return $this->is_promo_code_applied;
}
/**
* @param mixed $is_promo_code_applied
*/
public function setIsPromoCodeApplied($is_promo_code_applied)
{
$this->is_promo_code_applied = $is_promo_code_applied;
}
/**
* @return mixed
*/
public function getIsOrderPaid()
{
return $this->is_order_paid;
}
/**
* @param mixed $is_order_paid
*/
public function setIsOrderPaid($is_order_paid)
{
$this->is_order_paid = $is_order_paid;
}
/**
* @return Orders_Pricing
*/
public function getOrdersPricing()
{
return $this->orders_pricing;
}
/**
* @param mixed $orders_pricing
*/
public function setOrdersPricing($orders_pricing)
{
$this->orders_pricing = $orders_pricing;
}
/**
* @return Supplier_To_User_Ratings
*/
public function getSupplierToUserRatings()
{
return $this->supplier_to_user_ratings;
}
/**
* @param mixed $supplier_to_user_ratings
*/
public function setSupplierToUserRatings($supplier_to_user_ratings)
{
$this->supplier_to_user_ratings = $supplier_to_user_ratings;
}
/**
* @return User_Spot_Reviews
*/
public function getUserSpotReviews()
{
return $this->user_spot_reviews;
}
/**
* @param mixed $user_spot_reviews
*/
public function setUserSpotReviews($user_spot_reviews)
{
$this->user_spot_reviews = $user_spot_reviews;
}
/**
* @return WP_Currency
*/
public function getWpCurrency()
{
return $this->wp_currency;
}
/**
* @param mixed $wp_currency
*/
public function setWpCurrency($wp_currency)
{
$this->wp_currency = $wp_currency;
}
/**
* @return mixed
*/
public function getSpotIsVerified()
{
return $this->spot_is_verified;
}
/**
* @param mixed $spot_is_verified
*/
public function setSpotIsVerified($spot_is_verified)
{
$this->spot_is_verified = $spot_is_verified;
}
/**
* @return mixed
*/
public function getIsEmailSent()
{
return $this->is_email_sent;
}
/**
* @param mixed $is_email_sent
*/
public function setIsEmailSent($is_email_sent)
{
$this->is_email_sent = $is_email_sent;
}
/**
* @return mixed
*/
public function getIsSmsSent()
{
return $this->is_sms_sent;
}
/**
* @param mixed $is_sms_sent
*/
public function setIsSmsSent($is_sms_sent)
{
$this->is_sms_sent = $is_sms_sent;
}
/**
* @return mixed
*/
public function getIsNotificationSent()
{
return $this->is_notification_sent;
}
/**
* @param mixed $is_notification_sent
*/
public function setIsNotificationSent($is_notification_sent)
{
$this->is_notification_sent = $is_notification_sent;
}
/**
* @return mixed
*/
public function getIsActive()
{
return $this->is_active;
}
/**
* @param mixed $is_active
*/
public function setIsActive($is_active)
{
$this->is_active = $is_active;
}
private $is_fav_spot;
/**
* @return mixed
*/
public function getIsFavSpot()
{
return $this->is_fav_spot;
}
/**
* @param mixed $is_fav_spot
*/
public function setIsFavSpot($is_fav_spot)
{
$this->is_fav_spot = $is_fav_spot;
}
private $spot_image_url;
/**
* @return mixed
*/
public function getSpotImageUrl()
{
return $this->spot_image_url;
}
/**
* @param mixed $spot_image_url
*/
public function setSpotImageUrl($spot_image_url)
{
$this->spot_image_url = $spot_image_url;
}
/**
* @return mixed
*/
public function getWpPayment()
{
return $this->wp_payment;
}
/**
* @param mixed $wp_payment
*/
public function setWpPayment($wp_payment)
{
$this->wp_payment = $wp_payment;
}
/**
* @return mixed
*/
public function getPayName()
{
return $this->pay_name;
}
/**
* @param mixed $pay_name
*/
public function setPayName($pay_name)
{
$this->pay_name = $pay_name;
}
/**
* @return mixed
*/
public function getPayCardType()
{
return $this->pay_card_type;
}
/**
* @param mixed $pay_card_type
*/
public function setPayCardType($pay_card_type)
{
$this->pay_card_type = $pay_card_type;
}
/**
* @return mixed
*/
public function getPayLastFour()
{
return $this->pay_last_four;
}
/**
* @param mixed $pay_last_four
*/
public function setPayLastFour($pay_last_four)
{
$this->pay_last_four = $pay_last_four;
}
/**
* @return mixed
*/
public function getPayBrand()
{
return $this->pay_brand;
}
/**
* @param mixed $pay_brand
*/
public function setPayBrand($pay_brand)
{
$this->pay_brand = $pay_brand;
}
/**
* @return mixed
*/
public function getPayExpiryMonth()
{
return $this->pay_expiry_month;
}
/**
* @param mixed $pay_expiry_month
*/
public function setPayExpiryMonth($pay_expiry_month)
{
$this->pay_expiry_month = $pay_expiry_month;
}
/**
* @return mixed
*/
public function getPayExpiryYear()
{
return $this->pay_expiry_year;
}
/**
* @param mixed $pay_expiry_year
*/
public function setPayExpiryYear($pay_expiry_year)
{
$this->pay_expiry_year = $pay_expiry_year;
}
/**
* @return mixed
*/
public function getIsExtended()
{
return $this->is_extended;
}
/**
* @param mixed $is_extended
*/
public function setIsExtended($is_extended)
{
$this->is_extended = $is_extended;
}
/**
* @return mixed
*/
public function getOrdersExtended()
{
return $this->orders_extended;
}
/**
* @param mixed $orders_extended
*/
public function setOrdersExtended($orders_extended)
{
$this->orders_extended = $orders_extended;
}
/**
* @return mixed
*/
public function getIsCompletionEmailSent()
{
return $this->is_completion_email_sent;
}
/**
* @param mixed $is_completion_email_sent
*/
public function setIsCompletionEmailSent($is_completion_email_sent)
{
$this->is_completion_email_sent = $is_completion_email_sent;
}
/**
* @return mixed
*/
public function getIsCompletionSmsSent()
{
return $this->is_completion_sms_sent;
}
/**
* @param mixed $is_completion_sms_sent
*/
public function setIsCompletionSmsSent($is_completion_sms_sent)
{
$this->is_completion_sms_sent = $is_completion_sms_sent;
}
/**
* @return mixed
*/
public function getIsCompletionNotificationSent()
{
return $this->is_completion_notification_sent;
}
/**
* @param mixed $is_completion_notification_sent
*/
public function setIsCompletionNotificationSent($is_completion_notification_sent)
{
$this->is_completion_notification_sent = $is_completion_notification_sent;
}
/**
* @return mixed
*/
public function getIsExtendBookingEmailSent()
{
return $this->is_extend_booking_email_sent;
}
/**
* @param mixed $is_extend_booking_email_sent
*/
public function setIsExtendBookingEmailSent($is_extend_booking_email_sent)
{
$this->is_extend_booking_email_sent = $is_extend_booking_email_sent;
}
/**
* @return mixed
*/
public function getIsExtendBookingSmsSent()
{
return $this->is_extend_booking_sms_sent;
}
/**
* @param mixed $is_extend_booking_sms_sent
*/
public function setIsExtendBookingSmsSent($is_extend_booking_sms_sent)
{
$this->is_extend_booking_sms_sent = $is_extend_booking_sms_sent;
}
/**
* @return mixed
*/
public function getIsExtendBookingNotificationSent()
{
return $this->is_extend_booking_notification_sent;
}
/**
* @param mixed $is_extend_booking_notification_sent
*/
public function setIsExtendBookingNotificationSent($is_extend_booking_notification_sent)
{
$this->is_extend_booking_notification_sent = $is_extend_booking_notification_sent;
}
/**
* @return mixed
*/
public function getIsPreStartEmailSent()
{
return $this->is_pre_start_email_sent;
}
/**
* @param mixed $is_pre_start_email_sent
*/
public function setIsPreStartEmailSent($is_pre_start_email_sent)
{
$this->is_pre_start_email_sent = $is_pre_start_email_sent;
}
/**
* @return mixed
*/
public function getIsPreStartSmsSent()
{
return $this->is_pre_start_sms_sent;
}
/**
* @param mixed $is_pre_start_sms_sent
*/
public function setIsPreStartSmsSent($is_pre_start_sms_sent)
{
$this->is_pre_start_sms_sent = $is_pre_start_sms_sent;
}
/**
* @return mixed
*/
public function getIsPreStartNotificationSent()
{
return $this->is_pre_start_notification_sent;
}
/**
* @param mixed $is_pre_start_notification_sent
*/
public function setIsPreStartNotificationSent($is_pre_start_notification_sent)
{
$this->is_pre_start_notification_sent = $is_pre_start_notification_sent;
}
/**
* @return mixed
*/
public function getIsStartEmailSent()
{
return $this->is_start_email_sent;
}
/**
* @param mixed $is_start_email_sent
*/
public function setIsStartEmailSent($is_start_email_sent)
{
$this->is_start_email_sent = $is_start_email_sent;
}
/**
* @return mixed
*/
public function getIsStartSmsSent()
{
return $this->is_start_sms_sent;
}
/**
* @param mixed $is_start_sms_sent
*/
public function setIsStartSmsSent($is_start_sms_sent)
{
$this->is_start_sms_sent = $is_start_sms_sent;
}
/**
* @return mixed
*/
public function getIsStartNotificationSent()
{
return $this->is_start_notification_sent;
}
/**
* @param mixed $is_start_notification_sent
*/
public function setIsStartNotificationSent($is_start_notification_sent)
{
$this->is_start_notification_sent = $is_start_notification_sent;
}
/**
* @return mixed
*/
public function getHasParkingEnded()
{
return $this->has_parking_ended;
}
/**
* @param mixed $has_parking_ended
*/
public function setHasParkingEnded($has_parking_ended)
{
$this->has_parking_ended = $has_parking_ended;
}
/**
* @return mixed
*/
public function getParkingEndTime()
{
return $this->parking_end_time;
}
/**
* @param mixed $parking_end_time
*/
public function setParkingEndTime($parking_end_time)
{
$this->parking_end_time = $parking_end_time;
}
/**
* @return mixed
*/
public function getBookingCancelledOn()
{
return $this->booking_cancelled_on;
}
/**
* @param mixed $booking_cancelled_on
*/
public function setBookingCancelledOn($booking_cancelled_on)
{
$this->booking_cancelled_on = $booking_cancelled_on;
}
/**
* @return mixed
*/
public function getBookingStatus()
{
return $this->booking_status;
}
/**
* @param mixed $booking_status
*/
public function setBookingStatus($booking_status)
{
$this->booking_status = $booking_status;
}
/**
* @return mixed
*/
public function getBookingCancelledReason()
{
return $this->booking_cancelled_reason;
}
/**
* @param mixed $booking_cancelled_reason
*/
public function setBookingCancelledReason($booking_cancelled_reason)
{
$this->booking_cancelled_reason = $booking_cancelled_reason;
}
/**
* @return mixed
*/
public function getRefundAmount()
{
return $this->refund_amount;
}
/**
* @param mixed $refund_amount
*/
public function setRefundAmount($refund_amount)
{
$this->refund_amount = $refund_amount;
}
/**
* @return mixed
*/
public function getOrdersFlexible()
{
return $this->ordersFlexible;
}
/**
* @param mixed $ordersFlexible
*/
public function setOrdersFlexible($ordersFlexible)
{
$this->ordersFlexible = $ordersFlexible;
}
/**
* @return mixed
*/
public function getOrdersMonthly()
{
return $this->ordersMonthly;
}
/**
* @param mixed $ordersMonthly
*/
public function setOrdersMonthly($ordersMonthly)
{
$this->ordersMonthly = $ordersMonthly;
}
/**
* @return boolean
*/
public function getIsRenewalActive()
{
return $this->is_renewal_active;
}
/**
* @param mixed $is_renewal_active
*/
public function setIsRenewalActive($is_renewal_active)
{
$this->is_renewal_active = $is_renewal_active;
}
/**
* @return DateTime
*/
public function getNextRenewalDate()
{
return $this->next_renewal_date;
}
/**
* @param mixed $next_renewal_date
*/
public function setNextRenewalDate($next_renewal_date)
{
$this->next_renewal_date = $next_renewal_date;
}
/**
* @return mixed
*/
public function getNextRenewalAmount()
{
return $this->next_renewal_amount;
}
/**
* @param mixed $next_renewal_amount
*/
public function setNextRenewalAmount($next_renewal_amount)
{
$this->next_renewal_amount = $next_renewal_amount;
}
/**
* @return DateTime
*/
public function getCurrentMonthlyBookingEndDate()
{
return $this->current_monthly_booking_end_date;
}
/**
* @param DateTime $current_monthly_booking_end_date
*/
public function setCurrentMonthlyBookingEndDate($current_monthly_booking_end_date)
{
$this->current_monthly_booking_end_date = $current_monthly_booking_end_date;
}
/**
* @return Orders_Monthly
*/
function getFirstMonthlyBookingPricingObj() {
$criteria = Criteria::create();
$criteria->orderBy(['start_date' => Criteria::ASC])
->setMaxResults(1);
$orderMonthlyObj = $this->ordersMonthly->matching($criteria);
if (count($orderMonthlyObj) > 0) {
return $orderMonthlyObj[0];
}
return NULL;
}
/**
* @return Orders_Monthly
*/
function getLatestMonthlyBookingPricingObj() {
$criteria = Criteria::create();
$criteria->orderBy(['start_date' => Criteria::DESC])
->setMaxResults(1);
$orderMonthlyObj = $this->ordersMonthly->matching($criteria);
if (count($orderMonthlyObj) > 0) {
return $orderMonthlyObj[0];
}
return NULL;
}
/**
* @return ArrayCollection
*/
function getCompletedMonthlyBookingPricingObj() {
$criteria = Criteria::create();
$criteria->where(Criteria::expr()->eq('is_completed', 1))
->orderBy(['start_date' => Criteria::ASC]);
return $this->ordersMonthly->matching($criteria);
}
/**
* @return ArrayCollection
*/
function getInCompletedMonthlyBookingPricingObj() {
$criteria = Criteria::create();
$criteria->where(Criteria::expr()->eq('is_completed', 0))
->orderBy(['start_date' => Criteria::ASC]);
return $this->ordersMonthly->matching($criteria);
}
/**
* @return ArrayCollection
*/
function getAllMonthlyBookingsPricing() {
$criteria = Criteria::create();
$criteria->orderBy(['start_date' => Criteria::DESC]);
return $this->ordersMonthly->matching($criteria);
}
/**
* @return string
*/
public function getRefundReferenceNumber()
{
return $this->refund_reference_number;
}
/**
* @param string $refund_reference_number
*/
public function setRefundReferenceNumber($refund_reference_number)
{
$this->refund_reference_number = $refund_reference_number;
}
/**
* @return DateTime
*/
public function getRefundInitiateDate()
{
return $this->refund_initiate_date;
}
/**
* @param DateTime $refund_initiate_date
*/
public function setRefundInitiateDate($refund_initiate_date)
{
$this->refund_initiate_date = $refund_initiate_date;
}
/**
* @return DateTime
*/
public function getRefundProcessedDate()
{
return $this->refund_processed_date;
}
/**
* @param DateTime $refund_processed_date
*/
public function setRefundProcessedDate($refund_processed_date)
{
$this->refund_processed_date = $refund_processed_date;
}
/**
* @return bool
*/
public function isIsRefundProcessed()
{
return $this->is_refund_processed;
}
/**
* @param bool $is_refund_processed
*/
public function setIsRefundProcessed($is_refund_processed)
{
$this->is_refund_processed = $is_refund_processed;
}
/**
* @return Order_Flexible_Detail
*/
public function getOrderFlexibleDetail()
{
return $this->orderFlexibleDetail;
}
/**
* @param mixed $orderFlexibleDetail
*/
public function setOrderFlexibleDetail($orderFlexibleDetail)
{
$this->orderFlexibleDetail = $orderFlexibleDetail;
}
/**
* @return Orders_Refund
*/
public function getOrderRefund()
{
return $this->order_refund;
}
/**
* @param Orders_Refund $order_refund
*/
public function setOrderRefund($order_refund)
{
$this->order_refund = $order_refund;
}
/**
* @return ArrayCollection
*/
public function getOrderSupplierTransfer()
{
return $this->order_supplier_transfer;
}
/**
* @param $order_supplier_transfer
*/
public function setOrderSupplierTransfer($order_supplier_transfer)
{
$this->order_supplier_transfer = $order_supplier_transfer;
}
/**
* @return mixed
*/
public function getPayStripeCustomerId()
{
return $this->pay_stripe_customer_id;
}
/**
* @param mixed $pay_stripe_customer_id
*/
public function setPayStripeCustomerId($pay_stripe_customer_id)
{
$this->pay_stripe_customer_id = $pay_stripe_customer_id;
}
/**
* @return mixed
*/
public function getPayStripeCardId()
{
return $this->pay_stripe_card_id;
}
/**
* @param mixed $pay_stripe_card_id
*/
public function setPayStripeCardId($pay_stripe_card_id)
{
$this->pay_stripe_card_id = $pay_stripe_card_id;
}
/**
* @return mixed
*/
public function getOrdersMonthlyData()
{
return $this->ordersMonthlyData;
}
/**
* @param mixed $ordersMonthlyData
*/
public function setOrdersMonthlyData($ordersMonthlyData)
{
$this->ordersMonthlyData = $ordersMonthlyData;
}
/**
* @return mixed
*/
public function getIsPayoutCompleted()
{
return $this->is_payout_completed;
}
/**
* @param mixed $is_payout_completed
*/
public function setIsPayoutCompleted($is_payout_completed)
{
$this->is_payout_completed = $is_payout_completed;
}
/**
* @return mixed
*/
public function getPaymentMethodType()
{
return $this->payment_method_type;
}
/**
* @param mixed $payment_method_type
*/
public function setPaymentMethodType($payment_method_type)
{
$this->payment_method_type = $payment_method_type;
}
/**
* @return mixed
*/
public function getPayStripePaymentIntentId()
{
return $this->pay_stripe_payment_intent_id;
}
/**
* @param mixed $pay_stripe_payment_intent_id
*/
public function setPayStripePaymentIntentId($pay_stripe_payment_intent_id)
{
$this->pay_stripe_payment_intent_id = $pay_stripe_payment_intent_id;
}
/**
* @return mixed
*/
public function getPayStripeExtendPaymentIntentId()
{
return $this->pay_stripe_extend_payment_intent_id;
}
/**
* @param mixed $pay_stripe_extend_payment_intent_id
*/
public function setPayStripeExtendPaymentIntentId($pay_stripe_extend_payment_intent_id)
{
$this->pay_stripe_extend_payment_intent_id = $pay_stripe_extend_payment_intent_id;
}
/**
* @return mixed
*/
public function getPayStripePaymentMethodId()
{
return $this->pay_stripe_payment_method_id;
}
/**
* @param mixed $pay_stripe_payment_method_id
*/
public function setPayStripePaymentMethodId($pay_stripe_payment_method_id)
{
$this->pay_stripe_payment_method_id = $pay_stripe_payment_method_id;
}
/**
* @return mixed
*/
public function getIsOrderMonthlyRequestedEndSubscription()
{
return $this->is_order_monthly_requested_end_subscription;
}
/**
* @param mixed $is_order_monthly_requested_end_subscription
*/
public function setIsOrderMonthlyRequestedEndSubscription($is_order_monthly_requested_end_subscription)
{
$this->is_order_monthly_requested_end_subscription = $is_order_monthly_requested_end_subscription;
}
/**
* @return WP_Max_Vehicle_Size_Type
*/
public function getSpotMaxVehicleSizeType()
{
return $this->spot_max_vehicle_size_type;
}
/**
* @param WP_Max_Vehicle_Size_Type $spot_max_vehicle_size_type
*/
public function setSpotMaxVehicleSizeType($spot_max_vehicle_size_type)
{
$this->spot_max_vehicle_size_type = $spot_max_vehicle_size_type;
}
/**
* @return WP_Electric_Charger_Type
*/
public function getSpotElectricChargerType()
{
return $this->spot_electric_charger_type;
}
/**
* @param WP_Electric_Charger_Type $spot_electric_charger_type
*/
public function setSpotElectricChargerType($spot_electric_charger_type)
{
$this->spot_electric_charger_type = $spot_electric_charger_type;
}
/**
* @return mixed
*/
public function getHaveElectricCharger()
{
return $this->have_electric_charger;
}
/**
* @param mixed $have_electric_charger
*/
public function setHaveElectricCharger($have_electric_charger)
{
$this->have_electric_charger = $have_electric_charger;
}
/**
* @return WP_Parking_Max_Height
*/
public function getParkingMaxHeight()
{
return $this->parking_max_height;
}
/**
* @param WP_Parking_Max_Height $parking_max_height
*/
public function setParkingMaxHeight($parking_max_height)
{
$this->parking_max_height = $parking_max_height;
}
public function jsonSerialize()
{
return array(
'id' => $this->id,
'user' => $this->user,
'supplier' => $this->supplier,
'add_spot' => $this->add_spot,
'add_spot_id' => $this->add_spot->getId(),
'property_type_id' => $this->spot_property_type->getId(),
'parking_type_id' => $this->spot_parking_type->getId(),
'access_type_id' => $this->spot_access_type->getId(),
'max_vehicle_size_id' => $this->spot_max_vehicle_size->getId(),
'currency_id' => $this->wp_currency->getId(),
'currency_symbol' => $this->wp_currency->getSymbol(),
'booking_type' => $this->booking_type,
'is_completed' => $this->is_completed,
'start_time' => $this->start_time->format('Y-m-d H:i:s'),
'end_time' => $this->end_time->format('Y-m-d H:i:s'),
'initial_end_time' => $this->initial_end_time->format('Y-m-d H:i:s'),
'vehicle_model' => $this->vehicle_model,
'vehicle_license_plate' => $this->vehicle_license_plate,
'spot_title' => $this->spot_title,
'spot_address' => $this->spot_address,
'spot_street_number' => $this->spot_street_number,
'spot_postal_code' => $this->spot_postal_code,
'spot_city' => $this->spot_city,
'spot_spot_number' => $this->spot_spot_number,
'spot_latitude' => $this->spot_latitude,
'spot_longitude' => $this->spot_longitude,
'spot_street_name' => $this->spot_street_name,
'spot_about_spot' => $this->spot_about_spot,
'spot_access_type_detail' => $this->spot_access_type_detail,
'spot_special_tips' => $this->spot_special_tips,
'spot_parking_type_other' => $this->spot_parking_type_other,
'spot_property_type_other' => $this->spot_property_type_other,
'spot_access_type_other' => $this->spot_access_type_other,
'is_promo_code_applied' => $this->is_promo_code_applied,
'is_order_paid' => $this->is_order_paid,
'spot_is_verified' => $this->spot_is_verified,
'is_email_sent' => $this->is_email_sent,
'is_sms_sent' => $this->is_sms_sent,
'is_notification_sent' => $this->is_notification_sent,
'is_fav_spot' => $this->is_fav_spot,
'hourly_rate' => $this->orders_pricing != NULL ? $this->orders_pricing->getHourlyRate() : '',
'daily_max' => $this->orders_pricing != NULL ? $this->orders_pricing->getDailyMax() : '',
'sub_total_price' => $this->orders_pricing != NULL ? $this->orders_pricing->getSubTotalPrice() : '',
'tax_price' => $this->orders_pricing != NULL ? $this->orders_pricing->getTaxPrice() : '',
'service_fee_price' => $this->orders_pricing != NULL ? $this->orders_pricing->getServiceFeePrice() : '',
'total_price' => $this->orders_pricing != NULL ? $this->orders_pricing->getTotalPrice() : '',
'spot_image_url' => $this->spot_image_url,
'is_spot_rated' => $this->getUserSpotReviews() != NULL ? $this->getUserSpotReviews()->getIsRated() : false,
'wp_payment_id' => $this->getWpPayment() != NULL ? $this->getWpPayment()->getId() : '',
'payment_method_type' => $this->payment_method_type,
'pay_name' => $this->pay_name,
'pay_brand' => $this->pay_brand,
'pay_card_type' => $this->pay_card_type,
'pay_expiry_month' => $this->pay_expiry_month,
'pay_expiry_year' => $this->pay_expiry_year,
'pay_last_four' => $this->pay_last_four,
'is_extended' => $this->is_extended,
'orders_extended' => $this->orders_extended,
// 'orders_extended' => $this->is_extended == true ? $this->orders_extended->toArray() : '',
'is_completion_email_sent' => $this->is_completion_email_sent,
'is_completion_sms_sent' => $this->is_completion_sms_sent,
'is_completion_notification_sent' => $this->is_completion_notification_sent,
'is_extend_booking_email_sent' => $this->is_extend_booking_email_sent,
'is_extend_booking_notification_sent' => $this->is_extend_booking_notification_sent,
'is_extend_booking_sms_sent' => $this->is_extend_booking_sms_sent,
'is_pre_start_email_sent' => $this->is_pre_start_email_sent,
'is_pre_start_sms_sent' => $this->is_pre_start_sms_sent,
'is_pre_start_notification_sent' => $this->is_pre_start_notification_sent,
'is_start_email_sent' => $this->is_start_email_sent,
'is_start_sms_sent' => $this->is_start_sms_sent,
'is_start_notification_sent' => $this->is_start_notification_sent,
'has_parking_ended' => $this->has_parking_ended,
'parking_end_time' => $this->parking_end_time == NULL ? '' : $this->parking_end_time->format('Y-m-d H:i:s'),
'booking_cancelled_on' => $this->booking_cancelled_on == NULL ? '' : $this->booking_cancelled_on->format('Y-m-d H:i:s'),
'booking_cancelled_reason' => $this->booking_cancelled_reason,
'booking_status' => $this->booking_status,
'refund_amount' => $this->refund_amount,
'original_service_fee_price' => $this->orders_pricing != NULL ? $this->orders_pricing->getOriginalServiceFeePrice() : '',
'original_sub_total_price' => $this->orders_pricing != NULL ? $this->orders_pricing->getOriginalSubTotalPrice() : '',
'original_tax_price' => $this->orders_pricing != NULL ? $this->orders_pricing->getOriginalTaxPrice() : '',
'original_total_price' => $this->orders_pricing != NULL ? $this->orders_pricing->getOriginalTotalPrice() : '',
'discount_total' => $this->orders_pricing != NULL ? $this->orders_pricing->getDiscountTotal() : '',
'user_id' => $this->user->getId(),
'spot_id' => $this->add_spot->getId(),
'supplier_id' => $this->supplier->getId(),
'ordersFlexible' => $this->getOrdersFlexible(),
'orderLatestMonthly' => count($this->ordersMonthly) > 0 ? $this->getLatestMonthlyBookingPricingObj()->jsonSerialize() : NULL,
'is_renewal_active' => $this->is_renewal_active,
'next_renewal_amount' => $this->next_renewal_amount,
'next_renewal_date' => $this->next_renewal_date == NULL ? '' : $this->next_renewal_date->format('Y-m-d'),
'current_monthly_booking_end_date' => $this->current_monthly_booking_end_date == NULL ? '' : $this->current_monthly_booking_end_date->format('Y-m-d'),
'refund_initiate_date' => $this->refund_initiate_date == NULL ? '' : $this->refund_initiate_date->format('Y-m-d'),
'refund_processed_date' => $this->refund_processed_date == NULL ? '' : $this->refund_processed_date->format('Y-m-d'),
'booked_on' => date("Y-m-d H:i:s", ($this->getCreatedAt() / 1000)),
'is_refund_processed' => $this->is_refund_processed,
'refund_reference_number' => $this->refund_reference_number,
'ordersFlexibleDetail' => $this->orderFlexibleDetail != NULL ? $this->getOrderFlexibleDetail()->jsonSerialize() : NULL,
'ordersMonthlyData' => $this->getOrdersMonthlyData(),
'is_payout_completed' => $this->is_payout_completed,
'is_discount_applicable' => $this->orders_pricing != NULL ? $this->getOrdersPricing()->getIsDiscountApplicable() : false,
'promo_code' => $this->orders_pricing != NULL && $this->getOrdersPricing()->getPromoCode() != NULL ? $this->getOrdersPricing()->getPromoCode()->jsonSerialize() : NULL,
'invoice' => $this->getOrdersPricing() != NULL ? $this->getOrdersPricing()->getInvoice() : '',
'is_order_monthly_requested_end_subscription' => $this->is_order_monthly_requested_end_subscription,
'max_vehicle_size_type_id' => $this->getSpotMaxVehicleSizeType() != NULL ? $this->getSpotMaxVehicleSizeType()->getId() : NULL,
'electric_charger_type_id' => $this->getSpotElectricChargerType() != NULL ? $this->getSpotElectricChargerType()->getId() : NULL,
'parking_max_height' => $this->getParkingMaxHeight() != NULL ? $this->getParkingMaxHeight()->getId() : NULL,
'have_electric_charger' => $this->have_electric_charger,
);
}
/**
* @var string $created
*
* @ORM\Column(name="created_at", type="string", nullable=false)
*/
protected $createdAt;
/**
* @var string $updated
*
* @ORM\Column(name="updated_at", type="string", nullable=false)
*/
protected $updatedAt;
public function getCreatedAt()
{
return $this->createdAt;
}
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt()
{
return $this->updatedAt;
}
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* @ORM\PrePersist
* @ORM\PreUpdate
*/
public function updatedTimestamps()
{
$this->setUpdatedAt(round(microtime(true) * 1000));
if ($this->getCreatedAt() === null) {
$this->setCreatedAt(round(microtime(true) * 1000));
}
}
public function __construct() {
$this->orders_extended = new ArrayCollection();
$this->ordersMonthly = new ArrayCollection();
$this->ordersFlexible = new ArrayCollection();
$this->order_supplier_transfer = new ArrayCollection();
$this->setCreatedAt(round(microtime(true) * 1000));
}
}