<commit_before><?php
namespace Monubit\RatingsBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * A Rating
 *
 * @ORM\Entity
 * @ORM\Table(name="rating")
 */
class Rating {
	
	
	/**
	 * @ORM\Id
	 * @ORM\GeneratedValue(strategy="AUTO")
	 * @ORM\Column(type="integer")
	 *
	 * @var int
	 */
	private $id;

	/**
	 * The monument this rating is for.
	 * 
	 * @ORM\ManyToOne(targetEntity="\Monubit\MonumentBundle\Entity\Monument", inversedBy="rating")
	 */
	private $monument;
	
	/**
	 * The user who made this rating.
	 *
	 * @ORM\ManyToOne(targetEntity="\Monubit\UserBundle\Entity\User", inversedBy="rating")
	 */
	private $user;
	
	/**
	 * The rating the user gave to the monument.
	 *
	 * @ORM\Column(type="smallint", nullable=false)<commit_msg>Added indexes and uniqueness constraints<commit_after><?php
namespace Monubit\RatingsBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;


/**
 * A Rating
 * 
 *
 * @ORM\Entity
 * @ORM\Table(name="rating",
 * 	uniqueConstraints={
 * 		@ORM\UniqueConstraint(name="monumentuser_unique", columns={"monument_id", "user_id"})
 * 	},
 * 	indexes={
 * 		@ORM\index(name="monumentrating_idx", columns={"monument_id", "rating"})
 * 	}
 * )
 * @UniqueEntity({"monument", "user"})
 */
class Rating {
	
	
	/**
	 * @ORM\Id
	 * @ORM\GeneratedValue(strategy="AUTO")
	 * @ORM\Column(type="integer")
	 *
	 * @var int
	 */
	private $id;

	/**
	 * The monument this rating is for.
	 * 
	 * @ORM\ManyToOne(targetEntity="\Monubit\MonumentBundle\Entity\Monument", inversedBy="rating")
	 */
	private $monument;
	
	/**
	 * The user who made this rating.
	 *
	 * @ORM\ManyToOne(targetEntity="\Monubit\UserBundle\Entity\User", inversedBy="rating")
	 */
	private $user;
	
	/**
	 * The rating the user gave to the monument.
	 *
	 * @ORM\Column(type="smallint", nullable=false)
{'fraction_non_alphanumeric': 0.17168998923573736, 'fraction_numerical': 0.0, 'mean_word_length': 3.7789203084832903, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1204671', 'n_tokens_mistral': 701, 'n_tokens_neox': 631, 'n_words': 115}