Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Application\LocationBundle\Document;
- use Doctrine\ODM\MongoDB\SoftDelete\SoftDeleteable;
- /**
- * @mongodb:Document(
- * collection="country"
- * )
- * @Indexes({
- * @Index(keys={"iocCode"="asc", unique=true}),
- * @Index(keys={"name"="asc"}),
- * @Index(keys={"nameI18N"="asc"})
- * })
- */
- class Country implements SoftDeleteable
- {
- /**
- * Id
- *
- * @var \MongoId
- * @mongodb:Id
- */
- protected $id = null;
- /**
- * The official IOC Code of this Country
- *
- * @mongodb:Field(type="string")
- * @var string
- */
- protected $iocCode;
- /**
- * The English name of this country
- *
- * @mongodb:Field(type="string");
- * @var string
- */
- protected $name;
- /**
- * Contains the name of a country with mapped the language code
- * lang: string
- * name: string
- *
- * @mongodb:Field(type="hash")
- * @var Hash
- */
- protected $nameI18N;
- /**
- * Counts the registered users for every country to start everywhere with the
- * same base number for registration
- *
- * @mongodb:Field(type="int")
- * @Increment
- * @var Integer
- */
- protected $userAmount = 10000;
- /**
- * contains a date when this user is deleted
- *
- * @mongodb:Field(type="date")
- * @var MongoDate
- */
- protected $deletedAt;
- /**
- * Get id
- *
- * @return id $id
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set iocCode
- *
- * @param string $iocCode
- */
- public function setIocCode($iocCode)
- {
- $this->iocCode = $iocCode;
- }
- /**
- * Get iocCode
- *
- * @return string $iocCode
- */
- public function getIocCode()
- {
- return $this->iocCode;
- }
- /**
- * Set name
- *
- * @param string $name
- */
- public function setName($name)
- {
- $this->name = $name;
- }
- /**
- * Get name
- *
- * @return string $name
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * Set nameI18N
- *
- * @param hash $nameI18N
- */
- public function setNameI18N($nameI18N)
- {
- $this->nameI18N = $nameI18N;
- }
- /**
- * Get nameI18N
- *
- * @return hash $nameI18N
- */
- public function getNameI18N()
- {
- return $this->nameI18N;
- }
- /**
- * Set userAmount
- *
- * @param int $userAmount
- */
- public function setUserAmount($userAmount)
- {
- $this->userAmount = $userAmount;
- }
- /**
- * Get userAmount
- *
- * @return int $userAmount
- */
- public function getUserAmount()
- {
- return $this->userAmount;
- }
- /**
- * Increments the UserAmount
- */
- public function incrementUserAmount()
- {
- $this->userAmount++;
- }
- /**
- * If this object is deleted, this will return a date
- *
- * @return MongoDate
- */
- public function getDeletedAt()
- {
- return $this->deletedAt;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment