<commit_before><?php

namespace MySite\DataBaseBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;

/**
 * MySite\DataBaseBundle\Entity\Usuario
 *
 * @ORM\Table(name="usuario")
 * @ORM\Entity(repositoryClass="MySite\DataBaseBundle\Repository\UsuarioRepository")
 */
class Usuario implements UserInterface
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string $displayName
     *
     * @ORM\Column(name="displayname", type="string", length=255)
     */
    private $displayName;
    
    /**
     * @ORM\Column(name="username", type="string", length=25, unique=true)
     */
    private $username;
    
     /**
     * @ORM\Column(type="string", length=32)
     */
    private $salt;
    
    /**
     * @var string $password
     *
     * @ORM\Column(name="password", type="string", length=20)
     */
    private $password;
    
    /**
     * @var integer $capital
     *
     * @ORM\Column(name="capital", type="integer")
     */
    private $capital;
    
    /**
     * @var string $email
     *
     * @ORM\Column(name="email", type="string", length=60, unique=true)
     */
    private $email;
    
    /**
     * @ORM\ManyToMany(targetEntity="Categoria", inversedBy="usuarios")
     * @ORM\JoinTable(name="usuario_categoria"),
     *      joinColumns={@ORM\JoinColumn(name="usuario_id", referencedColumnName="id")},
     *      joinColumns={@ORM\JoinColumn(name="categoria_id", referencedColumnName="id")},
     */
    private $categorias;
    
    /**
     * @ORM\ManyToMany(targetEntity="GastoDetalle", inversedBy="usuarios")
     * @ORM\JoinTable(name="usuario_gatosdetalle"),
     *      joinColumns={@ORM\JoinColumn(name="usuario_id", referencedColumnName="id")},
     *      joinColumns={@ORM\JoinColumn(name="gastodetalle_id", referencedColumnName="id")},
     */
    private $gastoDetalles;
    
    /**
     * @ORM\OneToMany(targetEntity="Gasto", mappedBy="usuario", cascade={"persist"})
     */
    private $gastos;
    
    public function __construct()
    {
        $this->salt = md5(uniqid(null, true));
    }
    
    public function __toString() {
        return $this->getUsername();
    }

    
    /**
     * Get id
     *
     * @return integer <commit_msg>Avances<commit_after><?php

namespace MySite\DataBaseBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;

/**
 * MySite\DataBaseBundle\Entity\Usuario
 *
 * @ORM\Table(name="usuario")
 * @ORM\Entity(repositoryClass="MySite\DataBaseBundle\Repository\UsuarioRepository")
 */
class Usuario implements UserInterface
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string $displayName
     *
     * @ORM\Column(name="displayname", type="string", length=255)
     */
    private $displayName;
    
    /**
     * @ORM\Column(name="username", type="string", length=25, unique=true)
     */
    private $username;
    
     /**
     * @ORM\Column(type="string", length=32)
     */
    private $salt;
    
    /**
     * @var string $password
     *
     * @ORM\Column(name="password", type="string", length=20)
     */
    private $password;
    
    /**
     * @var integer $capital
     *
     * @ORM\Column(name="capital", type="integer")
     */
    private $capital;
    
    /**
     * @var string $email
     *
     * @ORM\Column(name="email", type="string", length=60, unique=true)
     */
    private $email;
    
    /**
     * @ORM\ManyToMany(targetEntity="Categoria", inversedBy="usuarios")
     * @ORM\JoinTable(name="usuario_categoria"),
     *      joinColumns={@ORM\JoinColumn(name="usuario_id", referencedColumnName="id")},
     *      joinColumns={@ORM\JoinColumn(name="categoria_id", referencedColumnName="id")},
     */
    private $categorias;
    
    /**
     * @ORM\ManyToMany(targetEntity="GastoDetalle", inversedBy="usuarios")
     * @ORM\JoinTable(name="usuario_gastodetalle"),
     *      joinColumns={@ORM\JoinColumn(name="usuario_id", referencedColumnName="id")},
     *      joinColumns={@ORM\JoinColumn(name="gastodetalle_id", referencedColumnName="id")},
     */
    private $gastoDetalles;
    
    /**
     * @ORM\OneToMany(targetEntity="Gasto", mappedBy="usuario", cascade={"persist"})
     */
    private $gastos;
    
    public function __construct()
    {
        $this->salt = md5(uniqid(null, true));
    }
    
    public function __toString() {
        return $this->getUsername();
    }

    
    /**
     * Get id
     *
     * @return integer 
{'fraction_non_alphanumeric': 0.16673666526669467, 'fraction_numerical': 0.00503989920201596, 'mean_word_length': 2.7181889149102263, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '7381936', 'n_tokens_mistral': 1604, 'n_tokens_neox': 1583, 'n_words': 210}