Skip to content
Snippets Groups Projects
Commit faa0a883 authored by Camille Simiand's avatar Camille Simiand
Browse files

Add Unique constraint to capsule name and add translation

parent 12ad040d
Branches
Tags
1 merge request!32tuleap-50-create-a-capsule-for-an-unexisting-project-in-the-legacy
......@@ -6,16 +6,15 @@ use App\Entity\User;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* Capsule
*
* @ORM\Table(name="capsule", uniqueConstraints={@ORM\UniqueConstraint(name="index_capsule_nom", columns={"nom"}), @ORM\UniqueConstraint(name="index_capsule_link", columns={"link"})})
* @ORM\Entity(repositoryClass="AppBundle\Repository\CapsuleRepository")
* @ORM\Table(name="capsule", uniqueConstraints={@ORM\UniqueConstraint(name="index_capsule_nom", columns={"nom"})})
* @ORM\Entity(repositoryClass="App\Repository\CapsuleRepository")
* @UniqueEntity(fields={"name"}, message="capsule.name.unique")
*/
class Capsule
{
/**
*
* @ORM\Column(name="id", type="integer")
......
......@@ -18,5 +18,6 @@ agreeTerms: You must agree with our terms
capsule:
name:
not_blank: Please enter a capsule name
unique: There is already a project with this name
video_url:
not_blank: Please enter a video URL
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment