<commit_before><?php
/**
 * 2017 HiPay
 *
 * NOTICE OF LICENSE
 *
 * @author    HiPay <<EMAIL>>
 * @copyright 2016 HiPay
 * @license   https://github.com/hipay/hipay-wallet-cashout-mirakl-integration/blob/master/LICENSE.md
 */

namespace HiPay\Wallet\Mirakl\Integration\Entity;

use DateTime;
use HiPay\Wallet\Mirakl\Notification\Model\LogVendorsInterface;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * Class LogVendors
 *
 * @ORM\Entity(repositoryClass="HiPay\Wallet\Mirakl\Integration\Entity\LogVendorsRepository")
 * @ORM\Table(name="log_vendors")
 */
class LogVendors implements LogVendorsInterface
{
    /**
     * @var int
     *
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type="integer")
     */
    protected $id;


    /**
     * @var int
     *
     * @ORM\Column(type="integer", nullable=false)
     * @Assert\NotBlank
     * @Assert\Type(type="integer")
     * @Assert\GreaterThan(value=0)
     */
    protected $miraklId;

    /**
     * @var int The HiPay Wallet account ID
     *
     * @ORM\Column(type="integer", nullable=false)
     * @Assert\NotBlank
     * @Assert\Type(type="integer")
     * @Assert\GreaterThan(value=0)
     */
    protected $hipayId;

    /**
     * @var string The HiPay Wallet account login
     *
     * @ORM\Column(type="string", nullable=true)
     */
    protected $login;

    /**
     * @var int
     * @ORM\Column(type="integer", unique=false, nullable=false)
     */
    protected $statusWalletAccount;

    /**
     * @var int
     * @ORM\Column(type="integer", unique=false, nullable=false)
     */
    protected $status;

    /**
     * @var string
     *
     * @ORM\Column(type="string", nullable=true)
     */
    protected $message;

    /**
     * @var int
     * @ORM\Column(type="integer", unique=false, nullable=false)
     */
    protected $nbDoc;

    /**
     * @var DateTime
     *
     * @ORM\Column(type="datetime", unique=false, nullable=false)
     *
     */
    protected $date;

    /**
     * @var Vendor enabled or not
     *
     * @ORM\Column(type="boolean", nullable=true)
     */
    protected $enabled;

    /**
     * Vendor constructor.
     * @param int $miraklId
     * @param int $hipayId
     */
    public function __construct($miraklId = null, $hipayId = null, $login = null, $statusWalletAccount = null, $status = null, $message = null, $nbDoc = 0)
    {
        $this->miraklId = $miraklId;
        $this->hipayId = $hipayId;
        $this->login = $login;
        $this->statusWalletAccount = $statusWalletAccount;
        $this->status = $status;
        $this->message = $message;
        $this->nbDoc = $nbDoc;
        $this->date = new \DateTime();
    }

    /**
     * @return int
     */
    public function getMiraklId()
    {
        return $this->miraklId;
    }
<commit_msg>Handle vendor already database with HIPAY_PROCESS = NO<commit_after><?php
/**
 * 2017 HiPay
 *
 * NOTICE OF LICENSE
 *
 * @author    HiPay <<EMAIL>>
 * @copyright 2016 HiPay
 * @license   https://github.com/hipay/hipay-wallet-cashout-mirakl-integration/blob/master/LICENSE.md
 */

namespace HiPay\Wallet\Mirakl\Integration\Entity;

use DateTime;
use HiPay\Wallet\Mirakl\Notification\Model\LogVendorsInterface;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * Class LogVendors
 *
 * @ORM\Entity(repositoryClass="HiPay\Wallet\Mirakl\Integration\Entity\LogVendorsRepository")
 * @ORM\Table(name="log_vendors")
 */
class LogVendors implements LogVendorsInterface
{
    /**
     * @var int
     *
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type="integer")
     */
    protected $id;


    /**
     * @var int
     *
     * @ORM\Column(type="integer", nullable=false)
     * @Assert\NotBlank
     * @Assert\Type(type="integer")
     * @Assert\GreaterThan(value=0)
     */
    protected $miraklId;

    /**
     * @var int The HiPay Wallet account ID
     *
     * @ORM\Column(type="integer", nullable=false)
     * @Assert\NotBlank
     * @Assert\Type(type="integer")
     * @Assert\GreaterThan(value=0)
     */
    protected $hipayId;

    /**
     * @var string The HiPay Wallet account login
     *
     * @ORM\Column(type="string", nullable=true)
     */
    protected $login;

    /**
     * @var int
     * @ORM\Column(type="integer", unique=false, nullable=false)
     */
    protected $statusWalletAccount;

    /**
     * @var int
     * @ORM\Column(type="integer", unique=false, nullable=false)
     */
    protected $status;

    /**
     * @var string
     *
     * @ORM\Column(type="string", nullable=true)
     */
    protected $message;

    /**
     * @var int
     * @ORM\Column(type="integer", unique=false, nullable=false)
     */
    protected $nbDoc;

    /**
     * @var DateTime
     *
     * @ORM\Column(type="datetime", unique=false, nullable=false)
     *
     */
    protected $date;

    /**
     * @var Vendor enabled or not
     *
     * @ORM\Column(type="boolean", nullable=true)
     */
    protected $enabled;

    /**
     * Vendor constructor.
     * @param int $miraklId
     * @param int $hipayId
     */
    public function __construct($miraklId = null, $hipayId = null, $login = null, $statusWalletAccount = null, $status = null, $message = null, $nbDoc = 0)
    {
        $this->miraklId = $miraklId;
        $this->hipayId = $hipayId;
        $this->login = $login;
        $this->statusWalletAccount = $statusWalletAccount;
        $this->status = $status;
        $this->message = $message;
        $this->nbDoc = $nbDoc;
        $this->date = new \DateTime();
        $this->enabled = true;
    }

    /**
     * @return int
     */
    public function getMiraklId()
    {
        return $this->miraklId;
    }

{'fraction_non_alphanumeric': 0.1501542680836476, 'fraction_numerical': 0.0037709976002742542, 'mean_word_length': 2.428319623971798, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 26, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4110566', 'n_tokens_mistral': 1982, 'n_tokens_neox': 1953, 'n_words': 352}