Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Entity;
- use App\Model\Account\MembershipInterface;
- use App\Model\Resource\TimestampableTrait;
- use App\Model\Resource\ToggleableTrait;
- use App\Model\Resource\UuidTrait;
- use App\Model\User\UserInterface;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * @ORM\Entity(repositoryClass="App\Repository\AccountRepository")
- * @ORM\Table(name="app_accounts")
- */
- class Account
- {
- use UuidTrait, TimestampableTrait, ToggleableTrait;
- /**
- * @var string
- * @ORM\Column(type="string", length=196, nullable=false)
- */
- private $description;
- /**
- * @var UserInterface|null
- * @ORM\ManyToOne(targetEntity="App\Entity\User")
- * @ORM\JoinColumn(nullable=false)
- */
- private $owner;
- /**
- * @var Collection|MembershipInterface[]
- * @ORM\OneToMany(targetEntity="App\Entity\Membership", mappedBy="user", cascade={"persist", "remove"})
- */
- private $memberships;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement