src/Core/Domain/Model/Insales/Application.php line 11

  1. <?php
  2.     
  3.     namespace App\Core\Domain\Model\Insales;
  4.     
  5.     use App\Core\Domain\Model\Traits;
  6.     use Doctrine\ORM\Mapping as ORM;
  7.     #[ORM\Entity]
  8.     #[ORM\Table(name'application')]
  9.     #[ORM\HasLifecycleCallbacks]
  10.     class Application
  11.     {
  12.         /**
  13.          * Загрузка только клиентов
  14.          */
  15.         public const IMPORT_TYPE_CLIENT 'import-client';
  16.         /**
  17.          * Загрузка клиенты + заказы
  18.          */
  19.         public const IMPORT_TYPE_CLIENT_WITH_ORDERS 'import-client-order';
  20.         use Traits\Id;
  21.         use Traits\Dates;
  22.         use Traits\Uuid;
  23.         
  24.         #[ORM\Column(type'bigint'options: ['unsigned' => true])]
  25.         private int $insalesId;
  26.         
  27.         #[ORM\Column(type'string'length500)]
  28.         private string $url;
  29.         
  30.         #[ORM\Column(type'string'length255)]
  31.         private string $password;
  32.         
  33.         #[ORM\Column(type'string'length255)]
  34.         private string $passwordToken;
  35.         
  36.         #[ORM\Embedded(class: Embed\Authentication::class, columnPrefix'auth_')]
  37.         private Embed\Authentication $authentication;
  38.     
  39.         #[ORM\Embedded(class: Embed\Import::class, columnPrefix'import_')]
  40.         private Embed\Import $import;
  41.     
  42.         #[ORM\Embedded(class: Embed\Options::class, columnPrefix'options_')]
  43.         private Embed\Options $options;
  44.         
  45.         #[ORM\Column(type'datetime'nullabletrueoptions: ['default' => null])]
  46.         private ?\DateTime $lastExportDate null;
  47.         
  48.         #[ORM\Column(type'bigint'options: ['default' => 0'unsigned' => true])]
  49.         private int $readyExportClient 0;
  50.         
  51.         /**
  52.          * Количество отклоненных адресов
  53.          * @var bool
  54.          */
  55.         #[ORM\Column(type'bigint'options: ['default' => 0])]
  56.         private int $bouncedEmailCount 0;
  57.     
  58.         /**
  59.          * Количество одноразовых email
  60.          * @var int
  61.          */
  62.         #[ORM\Column(type'bigint'options: ['default' => 0])]
  63.         private int $fakeEmailCount 0;
  64.         
  65.         #[ORM\Column(type'boolean'options: ['default' => false])]
  66.         private bool $installNotificationSend false;
  67.         #[ORM\Column(type'datetime'nullabletrueoptions: ['default' => null])]
  68.         private ?\DateTime $lastUpdateClient null;
  69.         #[ORM\Column(type'string'length20options: ['default' => self::IMPORT_TYPE_CLIENT_WITH_ORDERS])]
  70.         private string $importType self::IMPORT_TYPE_CLIENT_WITH_ORDERS;
  71.         
  72.         public function __construct()
  73.         {
  74.             $this->authentication = new Embed\Authentication();
  75.             $this->import = new Embed\Import();
  76.             $this->options = new Embed\Options();
  77.         }
  78.     
  79.         /**
  80.          * @return int
  81.          */
  82.         public function getInsalesId(): int
  83.         {
  84.             return $this->insalesId;
  85.         }
  86.     
  87.         /**
  88.          * @param int $insalesId
  89.          * @return Application
  90.          */
  91.         public function setInsalesId(int $insalesId): Application
  92.         {
  93.             $this->insalesId $insalesId;
  94.             return $this;
  95.         }
  96.     
  97.         /**
  98.          * @return string
  99.          */
  100.         public function getUrl(): string
  101.         {
  102.             return $this->url;
  103.         }
  104.     
  105.         /**
  106.          * @param string $url
  107.          * @return Application
  108.          */
  109.         public function setUrl(string $url): Application
  110.         {
  111.             $this->url $url;
  112.             return $this;
  113.         }
  114.     
  115.         /**
  116.          * @return string
  117.          */
  118.         public function getPassword(): string
  119.         {
  120.             return $this->password;
  121.         }
  122.     
  123.         /**
  124.          * @param string $password
  125.          * @return Application
  126.          */
  127.         public function setPassword(string $password): Application
  128.         {
  129.             $this->password $password;
  130.             return $this;
  131.         }
  132.     
  133.         /**
  134.          * @return string
  135.          */
  136.         public function getPasswordToken(): string
  137.         {
  138.             return $this->passwordToken;
  139.         }
  140.     
  141.         /**
  142.          * @param string $passwordToken
  143.          * @return Application
  144.          */
  145.         public function setPasswordToken(string $passwordToken): Application
  146.         {
  147.             $this->passwordToken $passwordToken;
  148.             return $this;
  149.         }
  150.     
  151.         /**
  152.          * @return Embed\Authentication
  153.          */
  154.         public function getAuthentication(): Embed\Authentication
  155.         {
  156.             return $this->authentication;
  157.         }
  158.     
  159.         /**
  160.          * @param Embed\Authentication $authentication
  161.          * @return Application
  162.          */
  163.         public function setAuthentication(Embed\Authentication $authentication): Application
  164.         {
  165.             $this->authentication $authentication;
  166.             return $this;
  167.         }
  168.     
  169.         /**
  170.          * @return Embed\Import
  171.          */
  172.         public function getImport(): Embed\Import
  173.         {
  174.             return $this->import;
  175.         }
  176.     
  177.         /**
  178.          * @param Embed\Import $import
  179.          * @return Application
  180.          */
  181.         public function setImport(Embed\Import $import): Application
  182.         {
  183.             $this->import $import;
  184.             return $this;
  185.         }
  186.     
  187.         /**
  188.          * @return Embed\Options
  189.          */
  190.         public function getOptions(): Embed\Options
  191.         {
  192.             return $this->options;
  193.         }
  194.     
  195.         /**
  196.          * @param Embed\Options $options
  197.          * @return Application
  198.          */
  199.         public function setOptions(Embed\Options $options): Application
  200.         {
  201.             $this->options $options;
  202.             return $this;
  203.         }
  204.     
  205.         /**
  206.          * @return \DateTime|null
  207.          */
  208.         public function getLastExportDate(): ?\DateTime
  209.         {
  210.             return $this->lastExportDate;
  211.         }
  212.     
  213.         /**
  214.          * @param \DateTime|null $lastExportDate
  215.          * @return Application
  216.          */
  217.         public function setLastExportDate(?\DateTime $lastExportDate): Application
  218.         {
  219.             $this->lastExportDate $lastExportDate;
  220.             return $this;
  221.         }
  222.     
  223.         /**
  224.          * @return int
  225.          */
  226.         public function getReadyExportClient(): int
  227.         {
  228.             return $this->readyExportClient;
  229.         }
  230.     
  231.         /**
  232.          * @param int $readyExportClient
  233.          * @return Application
  234.          */
  235.         public function setReadyExportClient(int $readyExportClient): Application
  236.         {
  237.             $this->readyExportClient $readyExportClient;
  238.             return $this;
  239.         }
  240.     
  241.         /**
  242.          * @return bool
  243.          */
  244.         public function isInstallNotificationSend(): bool
  245.         {
  246.             return $this->installNotificationSend;
  247.         }
  248.     
  249.         /**
  250.          * @param bool $installNotificationSend
  251.          * @return Application
  252.          */
  253.         public function setInstallNotificationSend(bool $installNotificationSend): Application
  254.         {
  255.             $this->installNotificationSend $installNotificationSend;
  256.             return $this;
  257.         }
  258.     
  259.         /**
  260.          * @return int
  261.          */
  262.         public function getBouncedEmailCount(): int
  263.         {
  264.             return $this->bouncedEmailCount;
  265.         }
  266.     
  267.         /**
  268.          * @param int $bouncedEmailCount
  269.          * @return Application
  270.          */
  271.         public function setBouncedEmailCount(int $bouncedEmailCount): Application
  272.         {
  273.             $this->bouncedEmailCount $bouncedEmailCount;
  274.             return $this;
  275.         }
  276.     
  277.         /**
  278.          * @return int
  279.          */
  280.         public function getFakeEmailCount(): int
  281.         {
  282.             return $this->fakeEmailCount;
  283.         }
  284.     
  285.         /**
  286.          * @param int $fakeEmailCount
  287.          * @return Application
  288.          */
  289.         public function setFakeEmailCount(int $fakeEmailCount): Application
  290.         {
  291.             $this->fakeEmailCount $fakeEmailCount;
  292.             return $this;
  293.         }
  294.         /**
  295.          * @return \DateTime|null
  296.          */
  297.         public function getLastUpdateClient(): ?\DateTime
  298.         {
  299.             return $this->lastUpdateClient;
  300.         }
  301.         /**
  302.          * @param \DateTime|null $lastUpdateClient
  303.          * @return $this
  304.          */
  305.         public function setLastUpdateClient(?\DateTime $lastUpdateClient): Application
  306.         {
  307.             $this->lastUpdateClient $lastUpdateClient;
  308.             return $this;
  309.         }
  310.         /**
  311.          * @return string
  312.          */
  313.         public function getImportType(): string
  314.         {
  315.             return $this->importType;
  316.         }
  317.         /**
  318.          * @param string $importType
  319.          * @return $this
  320.          */
  321.         public function setImportType(string $importType): Application
  322.         {
  323.             $this->importType $importType;
  324.             return $this;
  325.         }
  326.     }