src/Entity/PushSent.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Util\WS\Util;
  5. /**
  6.  * Description of PushSent
  7.  * @ORM\Table(name="push_sent")
  8.  * @ORM\Entity(repositoryClass="App\Repository\PushSentRepository")
  9.  * @ORM\HasLifecycleCallbacks
  10.  */
  11. class PushSent {
  12.     const STATUS_PUSH_PENDING 1;
  13.     const STATUS_PUSH_READED 2;
  14.     const STATUS_CURL_PENDING 1;
  15.     const STATUS_CURL_RESPONDED 2;
  16.     const STATUS_CURL_FINISHED 3;
  17.     
  18.     const PUSH_TYPE_SYNC_DOWNUP 1;
  19.     const PUSH_TYPE_SYNC_UPDOWN 2;
  20.     const PUSH_TYPE_APK_UPDATE 3;
  21.     const PUSH_TYPE_LICENSE_DISABLED 4;
  22.     const PUSH_TYPE_LICENSE_ENABLED 5;
  23.     const PUSH_TYPE_LICENSE_RESET_UID 6;
  24.     const PUSH_TYPE_VALIDATE_ACCESSCODE 7;
  25.     const PUSH_TYPE_UPLOAD_S3_BACKUP 8;
  26.     const PUSH_TYPE_ASK_SYNC_DOWNUP 9;
  27.     const PUSH_TYPE_PING_TO_ANDROID 10;
  28.     const PUSH_TYPE_CURL_TO_OMT 11;
  29.     const PUSH_TYPE_UPLOAD_S3_LOGS 12;
  30.     const PUSH_TYPE_UPLOAD_S3_ERROR_LOGS 13;
  31.     const PUSH_TYPE_CUSTOM_PUSH_MESSAGE 14;
  32.     const PUSH_TYPE_UPLOAD_S3_ONLY_BACKUP_ANDROID 15;
  33.     const PUSH_TYPE_RESET_SYNC_DATA 16;
  34.     const PUSH_TYPE_COMFIRM_PUSHER_LICENSE_CHANNEL 17;
  35.     const PUSH_TYPE_RECONNECT_WEBSOCKET 18;
  36.     const PUSH_TYPE_TRUNCATE_LEVEL_SERVICE_PRICE_TABLE 19;
  37.     
  38.     const SENDED_FIRST_BY_PARSE 1;
  39.     const SENDED_FIRST_BY_PUSHY 2;
  40.     const SENDED_FIRST_BY_GCM 3;
  41.     const SENDED_FIRST_BY_PUBNUB 4;
  42.     const SENDED_FIRST_BY_ONESIGNAL 5;
  43.     const SENDED_FIRST_BY_LICENSOR 6;
  44.     const SENDED_FIRST_BY_PUSHER 7;
  45.     
  46.     const SENDED_STAGE_PUSHY 1;
  47.     const SENDED_STAGE_PUBNUB 2;
  48.     const SENDED_STAGE_AWS 3;
  49.     const SENDED_STAGE_AWS_ALT 4;
  50.     const SENDED_STAGE_PUSHER 5;
  51.     const SENDED_STAGE_OMT_SOCKET_PUSH 6;
  52.     /**
  53.      * @var integer
  54.      * @ORM\Column(name="ps_id", type="integer")
  55.      * @ORM\Id
  56.      * @ORM\GeneratedValue(strategy="IDENTITY")
  57.      */
  58.     private $id;
  59.     /**
  60.      * @var \DateTime
  61.      * @ORM\Column(name="ps_sent_date", type="datetime", nullable=true)
  62.      */
  63.     private $sentDate;
  64.     /**
  65.      * @var string
  66.      * @ORM\Column(name="ps_verification_code", type="string", length=16, nullable=true, unique=true)
  67.      */
  68.     private $verificationCode;
  69.     /**
  70.      * @var \DateTime
  71.      * @ORM\Column(name="ps_respond_date", type="datetime", nullable=true)
  72.      */
  73.     private $respondDate;
  74.     /**
  75.      * @var integer
  76.      * @ORM\Column(name="ps_status", type="integer", length=1, nullable=true, options={"default":"1"})
  77.      */
  78.     private $pushStatus;
  79.     /**
  80.      * @var integer
  81.      * @ORM\Column(name="ps_type", type="integer", length=1, nullable=true)
  82.      */
  83.     private $pushType;
  84.     /**
  85.      * @var \App\Entity\AccountLicense
  86.      * @ORM\ManyToOne(targetEntity="App\Entity\AccountLicense")
  87.      * @ORM\JoinColumns({
  88.      *   @ORM\JoinColumn(name="ps_license", referencedColumnName="al_id", nullable=true, onDelete="CASCADE")
  89.      * })
  90.      */
  91.     private $psLicense;
  92.     /**
  93.      * @var string
  94.      * @ORM\Column(name="ps_application_mode", type="boolean", nullable=true, options={"default":"1"})
  95.      */
  96.     private $applicationMode;
  97.     /**
  98.      * @var string
  99.      * información extra que llega sobre el servicio
  100.      * @ORM\Column(name="ps_data", type="text", nullable=true)
  101.      */
  102.     private $dataInPush;
  103.     /**
  104.      * @var string
  105.      * @ORM\Column(name="ps_is_resend", type="integer", nullable=true, options={"default":"0"})
  106.      */
  107.     private $pushToResend 0;
  108.     /**
  109.      * @var \DateTime
  110.      * @ORM\Column(name="ps_resend_date", type="datetime", nullable=true)
  111.      */
  112.     private $resendDate;
  113.     /**
  114.      * @var integer
  115.      * @ORM\Column(name="ps_first_by", type="integer", length=1, nullable=true)
  116.      */
  117.     private $firstBy;
  118.     /**
  119.      * @var \App\Entity\SubLicense
  120.      * @ORM\ManyToOne(targetEntity="App\Entity\SubLicense")
  121.      * @ORM\JoinColumns({
  122.      *   @ORM\JoinColumn(name="ps_sub_license", referencedColumnName="sl_is", nullable=true, onDelete="CASCADE")
  123.      * })
  124.      */
  125.     private $psSubLicense;
  126.     /**
  127.      * @var boolean
  128.      * @ORM\Column(name="ps_asked_response", type="boolean", nullable=true)
  129.      */
  130.     private $askedResponse;
  131.     /**
  132.      * @var boolean
  133.      * @ORM\Column(name="ps_error_email", type="boolean", nullable=true)
  134.      */
  135.     private $errorNotifyEmail;
  136.     /**
  137.      * @var boolean
  138.      * @ORM\Column(name="ps_reset_completed", type="boolean", nullable=true)
  139.      */
  140.     private $wasResetCompleted;
  141.     /**
  142.      * @var \DateTime
  143.      * @ORM\Column(name="ps_curl_send_date", type="datetime", nullable=true)
  144.      */
  145.     private $omtCurlSendDate;
  146.     
  147.     /**
  148.      * @var string
  149.      * json del curl enviado a OMT
  150.      * @ORM\Column(name="ps_data_for_curl", type="text", nullable=true)
  151.      */
  152.     private $dataInCurl;
  153.     /**
  154.      * @var string
  155.      * json del curl enviado a OMT
  156.      * @ORM\Column(name="ps_data_for_curl_response", type="text", nullable=true)
  157.      */
  158.     private $dataInResponseCurl;
  159.     
  160.     /**
  161.      * @var \DateTime
  162.      * @ORM\Column(name="ps_curl_updated_date", type="datetime", nullable=true)
  163.      */
  164.     private $omtCurlUpdatedDate;
  165.     /**
  166.      * @var integer
  167.      * @ORM\Column(name="ps_curl_status", type="integer", length=1, nullable=true, options={"default":"1"})
  168.      */
  169.     private $omtCurlStatus;
  170.     /**
  171.      * @var integer
  172.      * @ORM\Column(name="ps_curl_type", type="integer", length=1, nullable=true)
  173.      */
  174.     private $omtCurlType;
  175.     
  176.     /**
  177.      * @var int
  178.      * @ORM\Column(name="ps_curl_omt_resend_counter", type="integer", nullable=true, options={"default":"0"})
  179.      */
  180.     private $omtCurlResendCounter 0;
  181.     
  182.     /**
  183.      * @var \DateTime
  184.      * @ORM\Column(name="ps_curl_resend_date", type="datetime", nullable=true)
  185.      */
  186.     private $omtCurlResendDate;
  187.     
  188.     /**
  189.      * @var boolean
  190.      * @ORM\Column(name="ps_is_testing_push", type="boolean", nullable=true, options={"default":"0"})
  191.      */
  192.     private $isTestingPush false;
  193.     
  194.     /**
  195.      * @var int
  196.      * @ORM\Column(name="ps_new_sended_stage", type="integer", nullable=true, options={"default":"1"})
  197.      */
  198.     private $newPushSendedStage 1;
  199.     /**
  200.      * @return type
  201.      */
  202.     public function getId() {
  203.         return $this->id;
  204.     }
  205.     /**
  206.      * @return type
  207.      */
  208.     public function getNewPushSendedStage() {
  209.         return $this->newPushSendedStage;
  210.     }
  211.     /**
  212.      * @param type $newPushSendedStage
  213.      */
  214.     public function setNewPushSendedStage($newPushSendedStage) {
  215.         $this->newPushSendedStage $newPushSendedStage;
  216.     }
  217.     /**
  218.      * @return type
  219.      */
  220.     public function getIsTestingPush() {
  221.         return $this->isTestingPush;
  222.     }
  223.     
  224.     /**
  225.      * @param type $isTestingPush
  226.      */
  227.     public function setIsTestingPush($isTestingPush) {
  228.         $this->isTestingPush $isTestingPush;
  229.     }
  230.  
  231.     /**
  232.      * @return type
  233.      */
  234.     public function getDataInResponseCurl() {
  235.         return $this->dataInResponseCurl;
  236.     }
  237.     /**
  238.      * @return \DateTime
  239.      */
  240.     public function getOmtCurlUpdatedDate() {
  241.         return $this->omtCurlUpdatedDate;
  242.     }
  243.     /**
  244.      * @param \DateTime $omtCurlUpdatedDate
  245.      */
  246.     public function setOmtCurlUpdatedDate(\DateTime $omtCurlUpdatedDate null) {
  247.         $this->omtCurlUpdatedDate $omtCurlUpdatedDate;
  248.     }
  249.     /**
  250.      * @return \DateTime
  251.      */
  252.     public function getOmtCurlSendDate() {
  253.         return $this->omtCurlSendDate;
  254.     }
  255.     /**
  256.      * @param \DateTime $omtCurlSendDate
  257.      */
  258.     public function setOmtCurlSendDate(\DateTime $omtCurlSendDate null) {
  259.         $this->omtCurlSendDate $omtCurlSendDate;
  260.     }
  261.     /**
  262.      * @param type $dataInResponseCurl
  263.      */
  264.     public function setDataInResponseCurl($dataInResponseCurl) {
  265.         $this->dataInResponseCurl $dataInResponseCurl;
  266.     }
  267.     /**
  268.      * @return \DateTime
  269.      */
  270.     public function getOmtCurlResendDate() {
  271.         return $this->omtCurlResendDate;
  272.     }
  273.     /**
  274.      * @param \DateTime $omtCurlResendDate
  275.      */
  276.     public function setOmtCurlResendDate(\DateTime $omtCurlResendDate null) {
  277.         $this->omtCurlResendDate $omtCurlResendDate;
  278.     }
  279.     /**
  280.      * @return type
  281.      */
  282.     public function getOmtCurlResendCounter() {
  283.         return $this->omtCurlResendCounter;
  284.     }
  285.     /**
  286.      * @param type $omtCurlResendCounter
  287.      */
  288.     public function setOmtCurlResendCounter($omtCurlResendCounter) {
  289.         $this->omtCurlResendCounter $omtCurlResendCounter;
  290.     }
  291.     /**
  292.      * @return type
  293.      */
  294.     public function getDataInCurl() {
  295.         return $this->dataInCurl;
  296.     }
  297.     /**
  298.      * @return type
  299.      */
  300.     public function getOmtCurlStatus() {
  301.         return $this->omtCurlStatus;
  302.     }
  303.     /**
  304.      * @return type
  305.      */
  306.     public function getOmtCurlType() {
  307.         return $this->omtCurlType;
  308.     }
  309.     /**
  310.      * @param type $dataInCurl
  311.      */
  312.     public function setDataInCurl($dataInCurl) {
  313.         $this->dataInCurl $dataInCurl;
  314.     }
  315.     /**
  316.      * @param type $omtCurlStatus
  317.      */
  318.     public function setOmtCurlStatus($omtCurlStatus) {
  319.         $this->omtCurlStatus $omtCurlStatus;
  320.     }
  321.     /**
  322.      * @param type $omtCurlType
  323.      */
  324.     public function setOmtCurlType($omtCurlType) {
  325.         $this->omtCurlType $omtCurlType;
  326.     }
  327.     /**
  328.      * @return type
  329.      */
  330.     public function getPsSubLicense() {
  331.         return $this->psSubLicense;
  332.     }
  333.     /**
  334.      * @param \App\Entity\SubLicense $psSubLicense
  335.      */
  336.     public function setPsSubLicense(\App\Entity\SubLicense $psSubLicense null) {
  337.         $this->psSubLicense $psSubLicense;
  338.     }
  339.     /**
  340.      * @return type
  341.      */
  342.     public function getSentDate() {
  343.         return $this->sentDate;
  344.     }
  345.     /**
  346.      * @return type
  347.      */
  348.     public function getVerificationCode() {
  349.         return $this->verificationCode;
  350.     }
  351.     /**
  352.      * @return type
  353.      */
  354.     public function getRespondDate() {
  355.         return $this->respondDate;
  356.     }
  357.     /**
  358.      * @return type
  359.      */
  360.     public function getPushStatus() {
  361.         return $this->pushStatus;
  362.     }
  363.     /**
  364.      * @return type
  365.      */
  366.     public function getPushType() {
  367.         return $this->pushType;
  368.     }
  369.     /**
  370.      * @return type
  371.      */
  372.     public function getPsLicense() {
  373.         return $this->psLicense;
  374.     }
  375.     /**
  376.      * @param \DateTime $sentDate
  377.      */
  378.     public function setSentDate(?\DateTime $sentDate) {
  379.         $this->sentDate $sentDate;
  380.     }
  381.     /**
  382.      * @param type $verificationCode
  383.      */
  384.     public function setVerificationCode($verificationCode) {
  385.         $this->verificationCode $verificationCode;
  386.     }
  387.     /**
  388.      * @param \DateTime $respondDate
  389.      */
  390.     public function setRespondDate(?\DateTime $respondDate) {
  391.         if (!$respondDate) {
  392.             $this->respondDate Util::getCurrentDate();
  393.         } else {
  394.             $this->respondDate $respondDate;
  395.         }
  396.     }
  397.     /**
  398.      * @param type $pushStatus
  399.      */
  400.     public function setPushStatus($pushStatus) {
  401.         $this->pushStatus $pushStatus;
  402.     }
  403.     /**
  404.      * @param type $pushType
  405.      */
  406.     public function setPushType($pushType) {
  407.         $this->pushType $pushType;
  408.     }
  409.     /**
  410.      * @param \App\Entity\AccountLicense $psLicense
  411.      */
  412.     public function setPsLicense(?\App\Entity\AccountLicense $psLicense) {
  413.         $this->psLicense $psLicense;
  414.     }
  415.     /**
  416.      * @return type
  417.      */
  418.     public function getApplicationMode() {
  419.         return $this->applicationMode;
  420.     }
  421.     /**
  422.      * @param type $applicationMode
  423.      */
  424.     public function setApplicationMode($applicationMode) {
  425.         $this->applicationMode $applicationMode;
  426.     }
  427.     /**
  428.      * @return type
  429.      */
  430.     public function getDataInPush() {
  431.         return $this->dataInPush;
  432.     }
  433.     /**
  434.      * @param type $dataInPush
  435.      */
  436.     public function setDataInPush($dataInPush) {
  437.         $this->dataInPush $dataInPush;
  438.     }
  439.     /**
  440.      * @return type
  441.      */
  442.     public function getPushToResend() {
  443.         return $this->pushToResend;
  444.     }
  445.     /**
  446.      * @param type $pushToResend
  447.      */
  448.     public function setPushToResend($pushToResend) {
  449.         $this->pushToResend $pushToResend;
  450.     }
  451.     /**
  452.      * @return type
  453.      */
  454.     public function getResendDate() {
  455.         return $this->resendDate;
  456.     }
  457.     /**
  458.      * @param \DateTime $resendDate
  459.      */
  460.     public function setResendDate(?\DateTime $resendDate) {
  461.         $this->resendDate $resendDate;
  462.     }
  463.     /**
  464.      * @return type
  465.      */
  466.     public function getFirstBy() {
  467.         return $this->firstBy;
  468.     }
  469.     /**
  470.      * @param type $firstBy
  471.      */
  472.     public function setFirstBy($firstBy) {
  473.         $this->firstBy $firstBy;
  474.     }
  475.     /**
  476.      * @return type
  477.      */
  478.     public function getAskedResponse() {
  479.         return $this->askedResponse;
  480.     }
  481.     /**
  482.      * @param type $askedResponse
  483.      */
  484.     public function setAskedResponse($askedResponse) {
  485.         $this->askedResponse $askedResponse;
  486.     }
  487.     /**
  488.      * @return type
  489.      */
  490.     public function getErrorNotifyEmail() {
  491.         return $this->errorNotifyEmail;
  492.     }
  493.     /**
  494.      * @param type $errorNotifyEmail
  495.      */
  496.     public function setErrorNotifyEmail($errorNotifyEmail) {
  497.         $this->errorNotifyEmail $errorNotifyEmail;
  498.     }
  499.     /**
  500.      * @return type
  501.      */
  502.     public function getWasResetCompleted() {
  503.         return $this->wasResetCompleted;
  504.     }
  505.     /**
  506.      * @param type $wasResetCompleted
  507.      */
  508.     public function setWasResetCompleted($wasResetCompleted) {
  509.         $this->wasResetCompleted $wasResetCompleted;
  510.     }
  511. }